News for hackers. Stuff that matters.
Re:JSX - a faster, safer, easier alternative to JavaScript by berdon on Wednesday May 30, 2012 @09:14PM (#4045795)
function foo(bar : string) : string...

Why, why do we need unnecessary tokens?! Get rid of the stupid :'s.

Re:JSX - a faster, safer, easier alternative to JavaScript by RandallBrown on Wednesday May 30, 2012 @10:06PM (#4045938)
I agree We should also take periods out of sentences They aren't needed as long as you capitalize the first letter of every sentence This makes things much cleaner
Re:JSX - a faster, safer, easier alternative to JavaScript by Danieru on Wednesday May 30, 2012 @10:29PM (#4046000)
Odd, I had no problem reading your comment. It also has an unusual clean-ness.

Maybe period-less sentences are the future Throughout history english has already had many typological changes From a DRY stand-point capitalization and periods contain the same information payload Eliminating one of them would thus be good software engineering Right?

Re:JSX - a faster, safer, easier alternative to JavaScript by ehsanu1 on Wednesday May 30, 2012 @10:52PM (#4046077)
I didn't notice there were no periods till I finished reading and then had a "hey, wait a second" glance back This is an experiment worth trying out: just write everything in this style for a while

The main problem I see here is figuring out whether a new sentence has been started when a Proper Noun or capitalized pronoun like "I" has been introduced I provide the current sentence as an example of that It's not so hard to figure out from context usually, but I'm sure there are easily constructed cases where the meaning changes based on the period Then again, much of the English language is like that

Re:JSX - a faster, safer, easier alternative to JavaScript by politician on Wednesday May 30, 2012 @11:04PM (#4046117)
"... been introduced I provide the ..."

I'll admit that I did a triple-take when reading through your example. Let's keep periods. :)

Re:JSX - a faster, safer, easier alternative to JavaScript by ehsanu1 on Thursday May 31, 2012 @12:46AM (#4046426)
This is a cognitive problem. I also read you as doing a "double-take", even though you clearly wrote "triple-take". Another cognition issue. The unthinking mind reacting automatically without consulting our conscious. The solution is obviously to augment our brains with computers. :)
Re:JSX - a faster, safer, easier alternative to JavaScript by aufreak3 on Thursday May 31, 2012 @12:46AM (#4046427)
Interesting. RandallBrown's was easy to read, but you're wasn't. I read "are the future throughout history" and cracked up :)
Re:JSX - a faster, safer, easier alternative to JavaScript by pcwalton on Wednesday May 30, 2012 @09:24PM (#4045818)
I think they make the types read better, personally, especially if you leave out the space to the left-hand side of the ':'. It clearly signifies to the reader where the code is entering the type grammar. And if you leave out both the spaces to the left and the right of the ':' (as OCaml code often does), it's exactly as many characters as the version with spaces.
Re:JSX - a faster, safer, easier alternative to JavaScript by viraptor on Wednesday May 30, 2012 @09:59PM (#4045916)
I was hoping it was because they allowed `(x, y, z: int)` as syntax sugar (like OOC does)... but no, they don't. In that case the : is a bit pointless.
Re:JSX - a faster, safer, easier alternative to JavaScript by B-Con on Wednesday May 30, 2012 @09:54PM (#4045903)
I think that most new languages feel obliged to have some sort of fun syntax quirk, usually, it seems, in the form of odd token choices.
Re:JSX - a faster, safer, easier alternative to JavaScript by dsrguru on Wednesday May 30, 2012 @09:21PM (#4045809)
They work for Scala...