Journal Articles
Browse in : |
All
> Journals
> CVu
> 293
(8)
All > Topics > Programming (877) All > Journal Columns > Francis' Scribbles (29) Any of these categories - All of these categories |
Note: when you create a new publication type, the articles module will automatically use the templates user-display-[publicationtype].xt and user-summary-[publicationtype].xt. If those templates do not exist when you try to preview or display a new article, you'll get this warning :-) Please place your own templates in themes/yourtheme/modules/articles . The templates will get the extension .xt there.
Title: Learning Other Languages
Author: Bob Schmidt
Date: 04 July 2017 17:53:09 +01:00 or Tue, 04 July 2017 17:53:09 +01:00
Summary: Francis Glassborow considers natural and computer languages as tools of communication.
Body:
I have this theory (actually it is a bit more than just a theory) that learning other languages improves my ability to use the language of my choice. This does not just apply to natural languages but to computer languages as well.
To get the greatest benefit one needs languages as different from ones first choice as possible. As a native English speaker learning French is of relatively little benefit. But learning Arabic, Chinese or a version of Sign has considerable impact. You do not need to be fluent in another language to benefit from studying it.
Let me take my three exemplars.
Arabic is fascinating in that its grammatical structure is radically different to English. It has only two tenses (completed and ongoing action) but seven moods including the very emphatic mood. In Spoken English we can use tone to emphasise and in the printed form we can use typeface but before printed writing became almost universal we had a problem that was solved by the use of ‘particles’ such as the classic biblical verses that start ‘verily, verily’ which is an attempt to translate the very emphatic mood that Hebrew shares with Arabic.
There is a great deal more to Arabic such as its use of consonants to convey root meaning and vowel structures to create nouns, verbs, adjectives, etc. As context often defines the part of speech written Arabic often omits many of the vowels. That makes it hard for the novice to read the local newspaper and much easier to practice on religious works where vowels are never omitted.
Because of the way vowels are used, rhymes are very easy in Arabic, so classical Arabic poetry usually requires very extensive triple rhyme schemes.
Written Chinese exhibits one of the great advantages of an ideographic language: you do not need to be able to speak it to read it. However, all the various spoken languages that come under the heading ‘Chinese’ share a common facet: they are very deficient in phonemes. This makes them rich languages for puns. That means that not being able to speak Mandarin, Cantonese, etc. detracts from your ability to appreciate Chinese poetry that relies heavily on puns.
I sometimes hear people opining that ideographic languages cannot have dictionaries. Well, I have a perfectly good Chinese dictionary somewhere on my book shelves. To use a dictionary for an alphabetic language you need to know the order of the alphabetic symbols (including how to deal with accents, etc.) For example, a German dictionary needs to have rules to deal with various idiosyncrasies of the German symbols.
In the case of Chinese, you need to be able to cope with two concepts: ‘The master stroke’ and the count of strokes (which if memory serves me correctly, can be anything from 1 to 17). The master stroke tells you which part of the dictionary to look in and the number of strokes takes you to the correct subsection. You may then have to look a little to find the one you want.
The group of languages under the heading ‘Sign’ Because of the extra dimensions brought about by the use of space, facial expression, etc., a Sign language is capable of shades of expression that spoken languages lack. However, it is almost impossible to represent them in writing. In the modern era, video has opened up their potential.
How does one produce poetry in Sign? I have no idea but I can hazard a guess that the visual representation would play a key part. I am reminded of Chinese calligraphy, so perhaps there is or should be an equivalent in Sign.
I wish that every school taught a version of Sign to every child. It is useful for communication across crowded rooms, noisy factories and other places where speech is difficult or frowned upon.
I could write a great deal more on natural languages and why I find the work of Noam Chomsky unsatisfying but let me move on.
Computer Languages
I can remember one Saturday when I had been commissioned by the local School Sailing Warden to write some race control software to run on his BBC Micro. It took me a couple of hours (the job was not that complicated). It had to be written in BBC Basic because that is what he had available, not a language with which I was enamoured. There were far better dialects of Basic. At the end the client commented that the code did not look like Basic. He was absolutely correct. The internal design and structure was Forth, the language in which I was most fluent in the 1980s. Had I tried the task by thinking in Basic it would certainly have taken me much longer and it would have been a much larger program. Yes, I was pretty fluent in Basic but it was the synergy of Forth with Basic that enabled me to work quickly and effectively.
This is just one example of the benefits of being multi-lingual. However the great benefit comes from having some familiarity with seriously different languages. It is to my eternal regret that I never managed to master any dialect of Lisp. I simply failed to make that fundamental step from procedural/functional type thinking.
What I am interested in is the fundamental design and construction of computer languages. I can use ideas from languages such as Prolog or Haskell, to name but two, to extend my skills in other languages in which I may be superficially more fluent.
The current crop of popular languages are, in my mind, too similar to each other to create any great benefit from studying them. Is Java better than C++? Is Ruby better than Python? I simply do not care. What I want to know is what do each of those languages teach my about the wider art of programming that makes it worth my while to invest time in studying them even if I do not actually master them or use them with a vengeance.
Studying Haskell has extended my understanding of C++ template metaprogramming. And actually it is much easier to do the design thought in Haskell and then implement it with templates.
My challenge to the readers of CVu is to write an article (as long as necessary but no longer) that tells me what your language(s) of choice have to reveal about the art of programming. I do not want to know why they are better but I want to know why they are different. I want to understand what they offer. For example, why are pure functions beneficial in problem solving? What is wrong with globals? Can you actually write real, useful code that is free of side-effects?
I do not want a better X where X is any language you like to name. I want a better understanding of the wider art of programming and how X can contribute to my understanding.
Over to you, reader. I am certain that you have insights worth sharing.
Notes:
More fields may be available via dynamicdata ..