Idiomatic snippets

66 views
Skip to first unread message

Valentin

unread,
Aug 20, 2015, 12:04:04 PM8/20/15
to Dart Misc
Hello Developers
I set up a website about how one would perform common programming tasks in the most idiomatic form in different languages. It is intended to be didactic, it's open to contributions (like a wiki) and we'd love to have more snippets written in DART.
It would hugely help if a few of you picked a random idiom statement :
  http://www.programming-idioms.org/random-idiom
and clicked [(+) New implementation...] to write a DART implementation. Most often, 2 lines suffice.

As you can see in the language coverage page, we don't have many Dart impl yet (click >> to reveal more than the 12 first langs).
You're also very welcome to add new idioms, as long as it's not dart-specific, not tied to a library, and not a complex algorithm.
UI works fine but is not perfect yet, so any feedback is also welcome.

Cheers
 Val
 

Jan Mostert

unread,
Aug 21, 2015, 10:27:35 AM8/21/15
to Dart Misc
Awesome!

I see some of the idioms have multiple tabs, maybe rather list both implementations under the same tab and the highest voted one at the top:

Also, it would be very useful if one can enable a global filter, for example I would like to see how to do something in Dart that I know how to do in Java, then, I would just filter for Java and Dart or even a compare mode.



--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new

To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.

Valentin

unread,
Aug 21, 2015, 11:37:28 AM8/21/15
to Dart Misc
Hi Jan
glad you like it!

About the filtering : if you set Java and Dart as your "favorite languages"  http://www.programming-idioms.org/my/java_dart_
then their code will always appear on top, not buried in hidden tabs. Layout is not "side-by-side compare mode", but close.

I'll be happy to consider a side-by-side view if you create an Issue : https://github.com/Deleplace/programming-idioms/issues

You may also choose to hide all the code that's not Java or Dart : button [ * ] on the left in the language bar (but it's no fun!).

Definitely it is legit to create 2 implementations in the same language if both are idiomatic. I don't know yet the best way to display this case, your proposal sounds like StackOverflow, why not. Please flle an issue.

Many thanks to you guys who recently contributed a few dozens of impl :)
Reply all
Reply to author
Forward
0 new messages