In terms of programming, what do semantics mean?

前端 未结 7 706
被撕碎了的回忆
被撕碎了的回忆 2021-02-01 05:27

This is a sentence from Eric Lippert\'s blog:

Given that unfortunate situation, it makes sense to emphasize the storage mechanism first, and then the

7条回答
  •  离开以前
    2021-02-01 05:46

    In other words, given the context of the article, he is saying that it would have been better for the developers of C# to concentrate on how they would store the data internally when a variable was declared and not care so much about specifying the precise method of declaring the variable.

    In other words by doing this in C#

    static int customerCount
    

    you are telling the compiler to prepare storage for a statically accessable integer and then telling it to label that storage as customerCount

    whereas in VB you would use this line

    dim shared customerCount as Integer
    

    telling the compiler, in theory, that you have a variable called customerCount that it should store and make statically available, and oh by the way, it happens to be an Integer.

    It all really a fine line distinction kinda thing.

提交回复
热议问题