4 ms·
Funny enough, ~ sigil will probably be retiring in favor of box. let x = ~"Thing"; //old code let x = box Thing // new code probably Note: I said prob
by Ygg2 13y ago
Funny enough, ~ sigil will probably be retiring in favor of box.
let x = ~"Thing"; //old code
let x = box Thing // new code probably
Note: I said probably because it's probably because:
A) Not sure it will be implemented
B) Not sure if that will be syntax
---
PS. Any link to dispatch operator periodic table?
Also I take your scala and raise you a Perl:
http://glyphic.s3.amazonaws.com/ozone/mark/periodic/Periodic%20Table%20of%20the%20Operators%20A4%20300dpi.jpg http://glyphic.s3.amazonaws.com/ozone/mark/periodic/Periodic...
- noelwelsh 13y agoRe: the dispatch periodic table. This is from a library in Scala (a web client called dispatch) that was someone's first project in Scala and went very overboard on the use of operators. It is generally considered bad design. The Dispatch periodic table is here: http://www.flotsam.nl/dispatch-periodic-table.html http://www.flotsam.nl/dispatch-periodic-table.html
- modersky 13y agoJust to avoid any misunderstandings: The linked page is a (very nicely done) joke. These are not Scala operators, but (by now retired) operators of a particular third party library for Http dispatch.
- Djehngo 13y agoThat's a shame, I happen to like the use of sigils to denote pointer types, to my eyes it makes code a lot easier to read. Out of curiosity why are they making the change? And will they add the `let x = box Thing` syntax or as an optional addition to the language or will it fully replace the old `let = ~Thing` syntax?
- Ygg2 13y agoI think the idea is to make heap allocation taxing to type. Basically the sigil is too easy to type, so its easy for application to just allocates a whup ass of memory. So, this way it might force you to think about each allocation.