DEV Community

Discussion on: How Would You Create the Perfect Coding Language?

Collapse
 
citronbrick profile image
CitronBrick

Here's my recipe for the perfect language.

  1. Ruby syntax.
  2. Use curly braces or colon (Python like) blocks, instead of the end keyword.
  3. Make it camelCased instead of snake_case.
  4. Give it a well-presented official documentation (like MDN or JavaDoc (docs.oracle.com/en/java/javase/17/...)
Collapse
 
janmpeterka profile image
Jan Peterka
  1. Agree, great starting point!
  2. I don't like end much, but I don't like curly braces better. colon is okayish, but requires indentation to signal structure. which has its pros, but takes from flexibility. Ruby also offers some ways to get around end - inline colon braces calls, end-less method definitions. Maybe there could be some more changes made - else ending if statements automatically comes to mind. But, explicit end of blocks allows to follow on that block, which is also a cool trick, so maybe it would be a loss to not have that.
  3. well, you can use both, it's just preference (okay, when using classes from base library, you can't, but I would guess there will be some smart way to "alias" them all.
  4. yes please!