|
|
|
|
|
by lowboy
5177 days ago
|
|
> I'm used to Python. Indentation there is natural. Its idiomatic to what Python is. But its not in javascript. Granted, indentation should always be used in js for readability, but brackets really are needed to denote code blocks. Why are brackets needed? Eliminating braces makes code easier to write and read (IMO) and I'd appreciate almost any indented language to follow suit where possible. > I'm probably old school, but when I write code I need to know explicitly what it will do. I've found this is mitigated by experience with CS. Just takes a small amount of time getting to know the language. Nowadays I have a pretty good idea of exactly what JS will be output when I'm writing CS. > Lots of times, my original code was just as concise as the coffeescript version, and a hell of a lot more concise than what CS rendered out. Concision in this case might be in the eye of the beholder. I find the outputted JS to be quite readable (the most important aspect) and I know what to look for and how to map it to my source code. Would I recommend porting all of your existing JS to CS? Hell no! But I'd give CS another try for a new project and see if you like it. I think it would click if you used it to actually program toward an end rather than port existing JS. I can see the latter being frustrating, seeing how many different patterns there are for JS development. |
|