Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: The Basques introduced us to object orientation?

by choroba (Archbishop)
on Jan 27, 2021 at 20:31 UTC ( #11127534=note: print w/replies, xml ) Need Help??


in reply to Re^2: The Basques introduced us to object orientation?
in thread The Basques introduced us to object orientation?

Postfix articles are common in other languages, too (Albanian, Bulgarian, Danish, Icelandic, Turkish...) There are also languages that don't have articles at all (e.g. Czech, Russian, Latin, Finnish, Chinese...).

If we use the metaphor, most programming languages use SVO, not SOV (I'm not sure I've ever seen "instance argument method", but programming languages are weird). Also, in OOP, the method is resolved based on the subject's class, but I'm not sure Basque has different meanings for the same verbs for different classes of nouns (but I can imagine a language like that). Many languages represent linguistic phenomena by different means (e.g. definiteness is expressed by an article in English, by a case in Finnish, by verb conjugation in Hungarian, and by word order in Czech).

Programming languages were created by humans who already knew natural languages. They follow and simplify them, so any similarities are easily explained by similarities between human languages. Claiming Basque to be an OO language is a provoking and interesting idea, but I fear it remains a fantasy.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^4: The Basques introduced us to object orientation?
by LanX (Cardinal) on Jan 27, 2021 at 21:47 UTC
    > we use the metaphor, most programming languages use SVO

    Could you please elaborate?

    I can only see SVO in OOP like $subject->verb ($object)

    But something like push @a,$b is at best VSO for me... (Well actually rather VOO)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      > But something like push @a,$b is at best VSO for me

      It is, but is it OO? It's still not SOV, anyway.

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
        My mental model of programming is that the computer is the subject, the functions are verbs in imperative form ("commands" sic ;) and the arguments are direct and indirect objects.

        The benefit of OOP was to introduce "actors" which translates grammatically to subjects to me. So it should have better be named SOP.

        And this is not purely philosophical, because I'm struggling with people who design their class instances as data containers. (Remember this talk about "How Moose made me a bad OO programmer" ?)

        Hence the difference between push @a,$b and a.push(b) (the latter being JS) is passive vs active.

        The Perl form being "push into @a the $b" VOO

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

        Update

        ) actually that's incorrectly merging two phases, the programmer is the subject giving orders in imperative form, the program is the subject executing those orders.

        I'm starting to feel like a character from Tron ;)

        > It's still not SOV, anyway.

        I'm no expert, but from what I remember is Forth very SOV...

        Update

        Or OOV depending on the POV

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

        ) point of view ;)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11127534]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2021-04-12 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?