3 ms·
> takes the best ideas of ... Python ... CoffeeScript > still got curly braces and semicola
by k__ 12y ago
> takes the best ideas of ... Python ... CoffeeScript
> still got curly braces and semicola
- bpicolo 12y agoClearly defined blocks are not a bad thing, and let you do things python can't.
- zufallsheld 12y agoCan you give an example?
- bpicolo 12y agoThe best justification is probably that you lose an entire class of errors, but imo you improve language expressiveness. Rust takes advantage of it's braces in good ways, I'd say.
- k__ 12y agoI'd like some examples, too. I found myself struggling with whitespace-languages at first.
- arohner 12y agoMulti-line lambdas, for one.
- k__ 12y agoWasn't the multi-line lambda problem in Python due to the fact how small lambdas have to be in Python?
- Grue3 12y agoAutomatic, unambiguous indentation of code by editor.
- ahoge 12y agoIt lets you paste some code and hit auto-format. I'm actually kinda serious. Moving pieces of Python code around is unnecessarily error-prone. I don't consider this to be a good tradeoff.
- 0942v8653 12y agoGo, Swift, and C# all have braces, looks like Python and CoffeeScript were overruled. I do agree with you on the semicolons, though (that's 4-to-1).
- k__ 12y agoWell, the text mentions the "best things". I wouldn't consider braces the best things in go, swift or c#.
- Grue3 12y agoThere's nothing "best" about significant whitespace.