Hacker News new | ask | show | jobs
by ktpsns 1534 days ago
Languages with native symbol types are very helpful for... you name it: Symbolic programming https://en.wikipedia.org/wiki/Symbolic_programming

In the context of computer algebra systems, which are much about manipulating abstract syntax trees, mathematical variables are usually represented as "symbols".

Beyond that, this page gives databases as an example, which is in fact very nice. Beyond being fast and efficient, using symbols allows certain errors to be compile-time instead of runtime, where typos are only detected on an application level and not on a code level. This is where symbols can play out their advantage. Think a bit of ENUMs in other languages.

1 comments

the "you name it" idiom in english is usually used to mean "anything you want", as in "you pick it"- so your first sentence reads like "native symbols are useful for anything, because (as everyone knows) symbolic programming is useful for anything"

i think the idiom you were going for was perhaps "you guessed it" or "you called it", as if poking fun at how, obviously, native symbols are helpful for symbolic programming, because it's the same word

Thanks for the tip! In fact I'm not a native speaker and this was some kind of "false friend" from the German "du sagst es" (="you say it") :-)