Why does syntax matter




















Akorbi is a leading language service provider that works in more than languages for translation and interpretation services. We believe every word is crucial to your communication when reaching out to your target audience, remote teams, or colleagues.

Syntax is a term used by linguists to describe a set of principles and rules that govern sentence structure and word order in a particular language. In English, the general rule of syntax follows the subject-verb-object rule.

The subject refers to the person or thing a noun performing the action, the verb describes the action being taken, and the object another noun refers to what is being acted upon if anything. Many of the rest of the languages put the verb first, followed by the subject and the object.

Syntax may also include descriptive words such as adjectives and adverbs that add descriptions to nouns and verbs. Spanish follows the same basic structure, except the noun and adjective are inverted. Professional translation and interpretation services such as Akorbi ensure we correctly communicate the syntax of sentences through an industry-best QA process.

Modifiers, such as adjectives and adverbs, should be close to the noun or verb that they modify in the sentence. The relationship between a modifier and its referent can be clarified with commas or punctuation to ensure the correct meaning is communicated. Both sentences are grammatically and syntactically correct.

Let us consider the following examples of syntax:. Similarly, John Milton shifts words in his poems frequently. Let us analyze lines from his poem Lycidas :. Syntax affects the nature of a prose text as well. It enhances its meanings, and contributes toward its tone. Quickness, decisiveness, and speed are added to a text by using short phrases , clauses , and sentences.

Whereas, in a text where the subject matter is serious, requiring contemplation, long, convoluted sentences are used to slow down the pace of a prose text. Yet another issue is how easy it is for simple typos to be hard for the human eye to catch, and how much mischief they can cause. I believe your professor is referring to Syntactic sugar.

Syntactic sugar is a computer science term that refers to syntax within a programming language that is designed to make things easier to read or to express, while alternative ways of expressing them exist. Robert Martin, pulling from Structured Programming theorem , abstracted what programmers fundamentally do with programming languages at his keynote at RailsConf Robert Martin youTube video, see after 14 minute mark, although I recommend the whole thing :.

That is all programmers do, from one programming language to another, just in a different syntax or user interface UI.

So in essence , syntax doesn't matter. But if you want to be specific, then obviously certain languages and syntax are better suited for certain tasks than others, whereby you could argue that syntax matters. Expressivity is an interesting case. Which language expresses the idea of passing a higher-order function the best? Common Lisp barely makes a syntactical variation.

Perl is pretty straightforward about making some level of differentiation. So is Python. Which approach best suits the problem domain? Which approach best can express the thoughts in your head with the least 'impedance mismatch'? Parsability is - in my mind- a big deal. In particular, I refer to the ability of the IDE to parse and chop the language without making errors. Reformatting is useful. Consider though - major systems of all sorts have been created with every serious language to solve real-world issues.

Although syntax is a barrier to express some things, it is a work-around-able barrier. Turing equivalence and all that. Syntax definitely matters, although you tend to notice it more when it's unintuitive and encourages bugs. For example, the infamous "world's last bug" joke:.

Syntax does matter, and I can give you two supporting examples: Dylan, which is a Lisp with a more conventional syntax, and Liskell, which is Haskell with Lisp-like syntax. In each case, a variant of the language was proposed that had exactly the same semantics, but radically different syntax.

In the case of Dylan, it was thought that dropping s-expressions in favor of something more conventional would help attract a wider range of programmers. It turned out that syntax wasn't the only thing preventing programmers from using Lisp.

In the case of Liskell, it was thought that using s-expressions would allow for easier use of macros. It turned out that macros really aren't necessary in Haskell, so that experiment didn't work either.

The answer might be in separating what "matters" into computer factors and human factors. There are a lot of human factors in syntax:. That might be why you'll always get a "yes and no" answer to this question -- because there's two aspects to it. Without syntax, we would not have a common "template" from which to communicate, at a human level, the intent of a block of code. Syntax provides a common framework from which compilers can be standardized; methods can be shared; maintenance can be simplified.

I think what really matters is API access , and availability of low-level functionality like memory control and locking when needed. Most other languages come with these features included.

Problem is, when you need additional functionality you often have to use a language like C to implement it. And it is cumbersome interfacing C with the language you are using. It's what is supported most of the time for true multi-threaded, preforming, cross-platform application development.

And the syntax of C is okay. Just very simple and relatively verbose. Amazing Syntax doesn't really matter that much. Power and API availability does We all need to interface with other people's code which is most of the time written in C or its derivitives. Syntax definitely matters. It's terrifically valuable if the language syntax is flexible enough to allow you to create a convenient and readable Domain-Specific Language for your application.

If you doubt this, just imagine doing algebra problems in prosaic Latin, as it was done before the 18th century, or imagine doing calculus without the now familiar Leibniz notation. Sure, a calculus text is unreadable to a novice, but with practice we can use calculus and the Leibniz notation to quickly solve a class of problems that required pages of mathematics with classical methods.

Programming is just another bit of mathematics. A convenient notation, close to the problem domain, can make an enormous difference in productivity. There seems to be a common belief that syntax is what makes a language difficult.

As so often with commonly held believes, exactly the opposite is true. Note that LISP syntax is only readable if at all because it has a lot more syntax than the above.

They will have to admit that a bit syntax is not so bad after all. I don't think it matters beyond personal preference. Yeah, that's a language I just made up Both would do exactly the same thing, in the same way, but the syntax is different, and Python is easier to read. So yes, syntax definitely matters.

Even "syntactical sugar" matters. If you wanna initiate a big flame, ask the folks, where they put the opening bracet in C-like languages. I mean. And this is just the same language! Also, ask them about spaces, where they place them function name and bracet, operators etc.

Syntax does matter. However in this day and age I'd say it matters almost entirely because of readability and not really in terms of the amount of keystrokes needed.



0コメント

  • 1000 / 1000