Then the second part of my statement applies.
- 0 Posts
- 6 Comments
Not to short-circuit the joke, but in this case, it’s because the valid JavaScript version is…
let a
…and one of TypeScript’s main design goals is to be a superset of JavaScript, that only adds syntax, and doesn’t re-write it.
Beyond that, it’s probably a case of some new language just using what the designer is familiar with.
JakenVeina@midwest.socialto Star Wars Memes@lemmy.world•Darth Vader personally oversees the operationsEnglish0·6 days agoAlso, I was born there, and I hate it.
JakenVeina@midwest.socialto Ask Lemmy@lemmy.world•What's your fav Nicolas Cage film and why?10·6 days agoNot one single mention for Gone in Sixty Seconds?
Lemmings… do I have bad taste?
JakenVeina@midwest.socialto Programming@programming.dev•What would be the best way to store the country of a user in SQL?3·7 days agoThat’s a perfectly valid approach, yes. We do exactly this, at work. It’s pretty common, if not ubiquitous, to have your database schema consist of not only structure, but data as well. We call it static data, and it’s all defined in deployable scripts, just like our tables and views are. If ISO makes changes to the dataset, then it’s just a table update to match it. And ISO is nice about keeping backwards compatibility inb their standards.
Since this is not strictly your own data, you could also go with just storing the code value on your tables, and letting the UI layer do the lookup, either with built-in features of your language/framework, or with a static csv file, like you mention. You may not want to do this for static data that is entirely your own, like, say, a status or type enum, since it makes your database schema less-self-descriptive, and more prone to becoming invalid.
You could also set the country code up as a not-strictly-enforced foreign key, where your app will lookup additional info (E.G. the proper name) for a country code, if it’s a standard one, but just skip that if it’s not a standard one.
It’s up to you what you think is most appropriate.
No question, this is what the moneymen want. They see programmers (all human employees, really) as a liability.