Comment

Comment by photon_off

I would like to be able to delineate strings with any character(s) of my choosing. The default could be single or double or triple quotes, but don't force me. I am sick of escaping characters in literals, I'd rather define a delineator that I know isn't in the string. Same for templating.

   let name = "Jane";
   let str = s{}:John said "Don't do that, {name}!":s
I would also like a JSON-like shorthand for declaring nested structures, without having to define each individual component separately. Eg:

   struct Person {
      user: {string name, int age},
      address: {string street, ...}
   }
   let p = new Person(<json>);
   print(p.user.age);
Convenience with arrays (python slicing is nice), maps, and primitive types pay huge dividends.

   arr.first();
   arr.last();
   arr[5,-5];  //5th to 5th to last
Built-in arbitrary length/precision numbers would be neat.

Besides that, tons and tons of useful libraries: IO, Date, JSON, DB Bindings, etc.

parent photon_off 6 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton