What are reasons to choose a scripting language over C#?

后端 未结 10 1572
萌比男神i
萌比男神i 2020-12-22 04:07

What are reasons to choose a non DSL scripting language over statically compiled language such as C#?

-edit- Good answers so far. I feel I should explain further. I

相关标签:
10条回答
  • 2020-12-22 04:26

    It's kind of been mentioned tangentially, but the question as phrased contrasts 'statically typed' versus 'scripting', and it's a false dichotomy. It's possible to have both, in languages like F#, where there is succinct syntax, type inference, and an interactive REPL. There are some trade-offs and tensions on both sides, but you get a lot of the best of both worlds.

    0 讨论(0)
  • 2020-12-22 04:28

    Portability to other platforms, and simpler development environment (usually just a text editor, not Visual Studio).

    0 讨论(0)
  • 2020-12-22 04:28

    In my experience two things are the most important decision that you have to make before you start designing / coding:

    • What language are you the most familiar with and understand the concepts of it?

    There is no use in going with C++ if you don't even get the idea of templates or OOP in general.

    • Are there already libraries or tools that assist you?

    Imho the most important point, because i.e. you want to code sth like twitter, you can write your own omnipotent webserver in Lisp and hack things like javascript- or form-convenience-functions together - but why no just use i.e. Tomcat/Java/Wicket or respectively Apache/PHP/Synfony? So all the basics are covered, well-tested and with many resources online. Even more you should consider ORM-frameworks/database-wrappers - they save a real lot of time and errors - if you need them.

    As a rule of thumb: If you start completely from scratch (i.e. research) pick the language you like most (and ofc is powerful enough for your task), if you do development in an common field (i.e. websites) pick the language according to your skills and the already available tools.

    If performance is really an immediate concern, stick with the compiling languages.

    Just my $0.02

    0 讨论(0)
  • 2020-12-22 04:31
    1. Flexibility: you don't have to worry about the static type system.
    2. Speed of development: an interactive language allows you to write code and test it faster.
    3. Built-in types: usually script languages provide dictionaries, lists, tuples, sets, etc. as part of the language (not libraries) with syntax sugar that can be very handy.
    4. More dynamic features:
      1. you can "eval" code at runtime very easily.
      2. you can replace on the fly functions and methods.

    The main drawback is that those features are often too powerful, and without an strict discipline it's very easy to write code that is unmaintainable.

    0 讨论(0)
提交回复
热议问题