Hacker News new | ask | show | jobs
by FlyingSnake 1932 days ago
I wonder if it’s possible for the programming languages to take advantage of the unique features in some languages, e.g. Agglutination in Hungarian and Turkish. Has any study being done to that effect?

I love the concept, this project has the potential to bring a whole new demography to the fold of programming.

4 comments

I see programming as manipulating a bunch of semantic objects. Syntax is just the (bad) user interface to this. This shouldn't rely on a natural spoken language at all. For example instead of `case` or `if`, there could (and should) just be symbols for such common things. Languages like Java have a lot of English keywords to represent flaky, redundant concepts with bad semantics. It's also a bit cumbersome that these languages often prevent you from naming variables with these already taken words. Seems actually like every 10 years people realize they didn't need all those English sentences in their languages if you look at a lineage like COBOL -> Visual Basic -> Java -> JavaScript or whatever 2010 fad.
Since RPN is front page, let me note that Turkish can be viewed as an RPN language -- the verb comes at the end

(although agglutination etc make it not quite so clear cut)

The agglutination is very similar to properties on structs

object.time.by.ability.duration

Except that there is a fixed standard order, and every object (word) responds in the same way. -- Very similar to an inheritance hierarchy from a single object :)

A difference would be that every subclass a.k.a word has a meaningful way to respond to the dimensions of duration, ability, startPoint, byWho, and a few others that are not easily expressible in English but very convenient

Bangla also is a subject-object-verb language and I hadn’t thought of it like RPN before!
An interesting concept from Turkish is each word can directly give you all (or single) objects that do or can respond to that action

  yap -- make
  yapan -- the one who makes
  yapanlar -- all those who make
  yapılan -- then one being made
  yapılanlar -- all those being made
This would be like functions having a standard way to return lists of all objects they're related to

Or direct solving of some complex queries like 'Who can open this door?'

In Turkish that would be open_this_door_an, where '_an' is the standard way to get a list of all objects capable of doing it

  * yap: make
  * yapan: maker
  * yapanlar: makers
  * yapılan: made (I think, "then one being made" doesn't make sense to me)
  * yapılanlar: OK you got me there!  It may be another job for "made" or goods or a synonym eg: objets d'art.  Yes, I did just use three languages as my own in one sentence.
I'm not a linguist. I've managed to fail French and German and yet pass Latin (whatever the heck that is!) at O level (old UK exam at age 16.)

I don't think we have quite the same concept you are describing, in English as such but I think we might come close. You can generally take a verb and turn it into a closely related adjective, gerund and gerundive. Anyway, if there isn't a word available in English, we simply steal (sorry, borrow) someone else's - simples! I bet I routinely use a few Turkish words without even realising it. English is a proud mongrel - it was an amalgam from day 1.

(edit: I've forgotten how to do a list hereabouts - sorry, Ooh two spaces)

Nice work, and nice list. I also failed in many languages :)

  yapıcı -- maker
  yapıcılar -- makers
  yapılcı -- something with the job of being made
Yes, that last one doesn't make sense, which shows you are right, they are different concepts

  yapmayan -- the one who doesn't make
  yapmayacı -- the one whose job is not to make
  yapabilan -- the one able to make
  yapmayabilan -- the one not able to make
Interesting to correspond those to programming concepts! A DOM query for objects. The task makes me think natural language is designed more for controlling scenes in a video game or theatre, than for programming -- since concepts like duration, force and timing are so prevalent

A Turkish word I'd like to see in English would be

  Kolay gelsin
Literally may it come easy to you, meaning both bless you, and I see your hardship

No matter where you say it, it makes people smile

"Makee" and "makees" aren't in the dictionary but native speakers would probably understand what you mean
Perl's $_ is supposedly something inspired by linguistics.
Indeed. It's called "the topic".

In the Raku Programming Language it is set with various explicit commands, such as `given` (just set it) or `with` (only fire if instantiated). Method calls without an invocant, are executed on the toppic. Together with phasers, this combines into:

    LEAVE .disconnect with $dbh;
In other words: if you leave this block of code (by any means, including an exception), disconnect the database handle if it was instantiated)