One of these years I'm going to make a Finnish programming language that enforces the correct case in arguments. And I don't mean silly arguments like camelCase vs kebab-case, I mean grammar.
Some examples to illustrate:
tiedosto on "foo.txt" avattuna
tulostin on PRN1
kirjoita(tiedostoon, "a")
kirjoita(tulostimelle, "b")
And
https://ordbokene.no/nob/nn/endreleg isn't a word in any language? The Nynorsk word for it is sadly just "variabel".
To make it more interesting, you could require agreement, and instead of "endreleg fart", how about just using the indefinite article for things that are changeable since things that are changeable seem kind of indefinite:
ei fart = 70
eit smell = "bang"
eit fag = "naturfag"
ein slutt = "."
And of course
forKvar fart
forKvar slutt
but
forKvart smell
forKvart fag
And if you mess up the agreement you get a red squiggly line, and for every such your grade goes down from 6 and if it's less than 2 your program fails.
What the devil kind of "Nynorsk" allows "kalkuler" in place of "beregn"? And as the other poster pointed out, 'endre' does not actually take the '-leg' ending to make an adjective; not in the written language at least. Your dialect may allow it but that hardly matters. Try 'foranderlig', although I do like the idea of using articles. However, as we have three articles but variability is binary, I suggest we assign 'en' (masculine, firm, rigid) to constants, 'et' (neuter, indecisive, wibbly-wobbly) to variables, and of course 'ei' (feminine) as referring only to collections, into which things may be inserted. That does leave us with the difficulty of how to declare a collection as constant; I suggest
`ei fylke er alltid ["Vestland", "Rogaland", "Troms", "Finnmark"]`
which on second thought suggests that we can just have `alltid` as a const-modifier on `er`. Simpler.
Another point to note is that Norwegian does not allow the Oxford comma; correct grammar is "Johan, Fredrik og Martin". To follow this rule you should require the last separator of a list to be 'og':
`ei fylke er alltid ["Vestland", "Rogaland", "Troms" og "Finnmark"]`
After spending way too much time thinking about how I would program in a language I never heard about I realized that as a native Dutch speaker Nynorsk is fairly readable.
As a Norwegian with passable German, written Dutch feels almost like just jumbling some letters around and adding unnecessary consonants... (Spoken Dutch, though, is entirely incomprehensible to me) The language continuum around the North Sea is fairly tight (more so if you consider Low German instead of standard German so you don't need to deal with the effects of the annoying High German consonant shift (think Dag -> Tag, Schip -> Schiff etc.))
One of these years I'm going to make a Finnish programming language that enforces the correct case in arguments. And I don't mean silly arguments like camelCase vs kebab-case, I mean grammar.
Some examples to illustrate:
Job security for DECADES.Funny :) but I think it would work better if the language not only required Nynorsk, but used Nynorsk and not Bokmål for all keywords:
https://ordbokene.no/nob/nn/ellers
I think I also saw "ikke" in there.
And https://ordbokene.no/nob/nn/endreleg isn't a word in any language? The Nynorsk word for it is sadly just "variabel". To make it more interesting, you could require agreement, and instead of "endreleg fart", how about just using the indefinite article for things that are changeable since things that are changeable seem kind of indefinite:
And of course but And if you mess up the agreement you get a red squiggly line, and for every such your grade goes down from 6 and if it's less than 2 your program fails.What the devil kind of "Nynorsk" allows "kalkuler" in place of "beregn"? And as the other poster pointed out, 'endre' does not actually take the '-leg' ending to make an adjective; not in the written language at least. Your dialect may allow it but that hardly matters. Try 'foranderlig', although I do like the idea of using articles. However, as we have three articles but variability is binary, I suggest we assign 'en' (masculine, firm, rigid) to constants, 'et' (neuter, indecisive, wibbly-wobbly) to variables, and of course 'ei' (feminine) as referring only to collections, into which things may be inserted. That does leave us with the difficulty of how to declare a collection as constant; I suggest
`ei fylke er alltid ["Vestland", "Rogaland", "Troms", "Finnmark"]`
which on second thought suggests that we can just have `alltid` as a const-modifier on `er`. Simpler.
Another point to note is that Norwegian does not allow the Oxford comma; correct grammar is "Johan, Fredrik og Martin". To follow this rule you should require the last separator of a list to be 'og':
`ei fylke er alltid ["Vestland", "Rogaland", "Troms" og "Finnmark"]`
This is the kind of quality response that makes HN great.
After spending way too much time thinking about how I would program in a language I never heard about I realized that as a native Dutch speaker Nynorsk is fairly readable.
I'm sold.
As a Norwegian with passable German, written Dutch feels almost like just jumbling some letters around and adding unnecessary consonants... (Spoken Dutch, though, is entirely incomprehensible to me) The language continuum around the North Sea is fairly tight (more so if you consider Low German instead of standard German so you don't need to deal with the effects of the annoying High German consonant shift (think Dag -> Tag, Schip -> Schiff etc.))
“Fast” means firm or constant. “Fart” means speed.
The examples have nothing to do with quick flatulence.
As a fellow Norwegian and nerd I have always wanted to be better at Nynorsk. Maybe this is what I need to get better at it!