What does it mean to be "standardised", and why is Haskell it? [closed] - haskell

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Wikipedia claims that Haskell is "standardised", but the Haskell standard is not ratified by an internationally recognised standards body such as ISO; not even by a national body such as BSI or ANSI.
So what really are the criteria for a programming language to be labelled "standardised"? Does it just need to have a specification published on a website somewhere?

You've answered your own question. A standardised language is one which is defined by some specification, be it a document or a 'reference implementation' in a language that is itself standardised and formalized (such as SML). Which body recognizes or approves the standard is not really at issue.
This is as opposed to an implementation-defined language, such as Perl or PHP, where what the language does is defined simply by what some particular "flagship" implementation of the language does.
So we can say a certain C compiler doesn't actually compile C properly, because it does not obey the standard. Meanwhile, we can't say that CPython does not interpret Python properly, because what it does is what Python does, by definition.
Haskell is defined by the Haskell Report, the latest version of which is Haskell 2010: http://www.haskell.org/onlinereport/haskell2010/
This report is crafted by a committee, voted on, and ratified. Furthermore, there historically have been and remain multiple Haskell compilers and interpreters which either conform to the report, or almost conform to the report, with documented exceptions.
Code written to the standard should be portable across compilers, and when divergences are found between compilers and the report (other than 'expected' ones), then it is usual that either the compiler or report will be changed to conform.

Related

What exactly does it mean for a programming language to be simple? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
What factors are important? How do you know if a given programming language is "simple" or "simpler" than another language?
I'm not sure if this is a fair question to ask, since different languages serve different purposes and it might not really be comparing apples to apples.
However, with that said, memory management would come to mind. One can argue that Java is a "simpler" language than C++, since it has a garbage collector that can deal with some of the complexities around memory management, instead of forcing you to do it yourself.
In my perspective, these are the points that define the complexity of a language.
Variation of syntax from common pseudocode and constructs
Ease of developing a structure for real-life entities like objects
Methods of structure enforcement at compile time.
Memory management strategy allocation/deallocation
Code reusability
Ease of code headers and directives management
Inbuilt libraries
Relative installation package sizes
Data exchange capabilities like over network of files
Process handling like thread management
Relative brevity of the code
Speed of compilation
Developer community size and documentation
OpenSource implementations
Platform dependence
And many more could be added to this list.

Who invented the switch statement? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 5 years ago.
Improve this question
Switch statement is presented in all main languages today (Javascript, Java, PHP, C#, C++, C), but in what language this statement has for the first time appeared?
Lisp has cond which Wikipedia's source places in the 1956-1958 timeframe.
I invented conditional expressions in connection with a set of chess legal move routines I wrote in FORTRAN for the IBM 704 at M.I.T. during 1957-58...A paper defining conditional expressions and proposing their use in Algol was sent to the Communications of the ACM but was arbitrarily demoted to a letter to the editor, because it was very short.
-- John McCarthy: Lisp Prehistory - Summer 1956 through Summer 1958
It can't really be answered, as it was an evolution of a concept. C (the oldest in your list) was evolved from B (also had switch), which evolved from BCPL (had switchon statement). BCPL came from CPL, which (AFAIK) didn't. On the other side of the Pascal-vs-C canyon, ALGOL (had case statement in ALGOL68) evolved from FORTRAN (had a rudimentary predecessor in the computed GO TO statement). The computed GO TO is very low-level and easily implemented in assembly.
Among the languages you're referring to, probably C would be the first. However, if you observe closely, the concept arises from more basic languages as in case of assembly level language,

How come we write programs in context-free languages? Shouldn't programs be in recursively enumerable languages in order to be Turing complete? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I really can't understand how we can simulate the output of a Turing machine (which accepts a recursively enumerable language) if we mostly code in context-free languages.
You are confusing the specification of a program with its output.
For example, a Turing machine that can accept a recursively enumerable language is still specified by a finite transition function or "rule table". The rule table itself can be expressed in a regular language.
Then again, only the basic syntax of a modern programming language is completely defined by a context free grammar. A valid program has to fulfill many conditions that are not captured by a grammar: identifiers have to be declared before they are used, a function can be defined only once, the program has to pass the typechecker, and so on.
"Mostly context-free" makes no sense in the same way that "slightly pregnant" makes no sense. The property is either there, or it isn't, and for any programming language I've ever used, it isn't.
But that's not the reason you can write arbitrary algorithms in them. The source code syntax of a language may or may not be describable by a particular grammar, but what matters is the input/output behaviour. For instance, a program that prints strings of the form A^iB^iC^i can be written in Pascal even though these strings do not form a context-free language. But the reason that this is possible is not that Pascal syntax is stronger than context-free (although that is true), it is the semantics of the constructs in Pascal (ultimately, the concept of the von Neumann machine on which the program will run).

which software can view any developed software code? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I would to know the software which can view code of Microsoft word software and any other software code. So that I can learn from that software code and how they used in there.
(sound's like illegal but really it is helpful for the programmer)
any Ideas
What you're describing is called a disassembler or decompiler. It is rarely useful for what you want it for, because the intent of the programmer expressed in variable, method, and class names - is mostly lost. This is somewhat less true for modern bytecode languages like Java and C#.
You ask for a decompiler. Please note decompiling is illegal in many juridictions. Also once you decompile you usually get very hard to read assembly code learning from which is problematic unless you have plenty of experience and know exactly what you're looking for.
You need to get a decompiler for viewing the code of dll and exe files based on the language its coded in.
example:
Delphi Dll Decompiler
search for an appropriate decompiler te get the code back.

Reference of similar functions between Programming Languages [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm wondering is there is a compiled knowledge base of similar functions or functionalities between several programming languages. The reason I'm asking this question is due to the fact that one is learning a new programming language and has extensive knowledge of another, it's often difficult to know or imagine the correlation of functions between those two languages.
Obviously, if such reference exists, it would make learning a new language much easier since one only had to lookup the similar function and eventually memorize it.
Rosetta Code - user-edited wiki focused on implementing tasks in different languages
Syntax across languages - more focused on syntax
Wikipedia: Comparison of programming languages (basic instructions)
Syntax across languages is the best one. It catalogs control structures, data types, libraries, comments, and much more. Includes information about Delphi, SML, OCaml, Java, Smalltalk, C++, Ruby, Perl, Python, Lisp, PL/I, PHP, EmacsLisp, and VisualBasic.
The original wiki is quite good because its a free flowing discussion(It's not meant to be a rule based encyclopedia like wikipedia) of programming, which with its focus on history, meandering ways, flame wars, and language fanboyism (all in good fun) tells a lot about how features x in language A is basically/better/sort of equivalent to feature y in language B.

Resources