General Discussions

Why Suddenly The languages I Studied Look Bad!?

The decisive goal of each programming language is to keep it effortless for the user and conceal the complexity in the implementation. The intact notion of theory in computer science verbalizes the abstraction by keeping it easy to the user. The theory puts a demand that every perception needs a formal proof for acceptance. Every concept is goal driven to optimize it to the computer architecture. After completion of my degree, when I have the bigger picture of what I have acquired, I still have following questions unanswered.

The Expression Notation
We study about prefix and postfix notations and its greater advantages. Why do not the programming languages we use follow prefix/postfix evaluation of expressions? Why is not my language a set of expressions formally proving my program is right?

The Data Type
Data is information. User should write the data leaving behind the type of storage to the system. But we don’t do that! Instead we are also asked to communicate the type of data and hence defining a data type.  Instead, for the user there should be only one data type. The “data” data-type. May be that’s why I can’t return functions. Language would be so cool if there was a provision to return the functions as well as a result.

The Definition of Data-Type
The definition of the data-type itself looks a faulty one. It’s not about how the data is stored in memory. In the first case, why should I even worry about how the data fits in the memory layout? It should be all about the operations which are possible on the data. Data type should be more of algebra on the data.

The Address Operation
Why the user is made aware of registers and pointer operations? Was it to cover up the limitations of the language? Instead, should not the language implementation take care of all the efficiency issues and not make it a concern to the user?

The Idea of Programmable
We all speak of domain specific languages today. Why is not my language giving me a customization of my choice? It could be as small as possible which can grow as large as possible, where user can bear in mind very few details and grow the language in his own terms.  Why there is a restriction that execution has to begin with “main”? Why is writing an interpreter for my required domain so complex? Is it that, the limitations of a language are covered up by adding more features than providing the abstraction?

The list of questions keeps growing like an ant trail. And that’s when I start falling in love with Functional programming

Advertisements

4 thoughts on “Why Suddenly The languages I Studied Look Bad!?

  1. data type is *not* always communicated– in weakly typed languages, the only type could at least theoretically be the “data” type. but its useful for example, to know whether “5” is a string from a keyboard or a quantity numeric 5. so think of type as “metadata” — and you know all “metadata” is data too.

    the reason that weak typing and duck typing even exist (and make it more like your ideal language) is because sometimes communicating type is tedious or unimportant to the person using the language. but the reason strong typing (where type is always communicated) exists is for two reasons:

    in many cases, a program will be easier to write to do its job reliably if type is tracked strictly. one of the more common alternatives to communicating type is to try to figure it out after the fact, and do things based on what type is determined. this can be as much work as strict typing makes.

    the other reasons are related to security and efficiency. strong-typed languages can be faster, more efficient, and ultimately run more safely (at least failing sooner instead of trying to go on with possibly corrupt or inaccurate results.)

    it sometimes comes down to what kind of failure you prefer– a quiet failure where results can sometimes be inaccurate, or a failure where you have to hear more about it, but you can find out the problem sooner. if youre learning to code or your code is not mission-critical, weak or dynamic typing means an easier coding job up to a point. if youre working for nasa or defense (or vital industrial processes) strong typing has real-world advantages. that said, i personally enjoy working with dynamic types. theyre more fun and theyre fine for many applications– especially for simpler code.

    Liked by 1 person

    1. This was so much informative. I am going to save this. Thank you so much. I could relate and understand.

      I have always compared and contrasted over static and dynamic types. I used to prefer C and Now I am into python. I agree to what you say. Thank you so much again.

      Liked by 1 person

Let me Know What you Think!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s