Talk:Language Comparison Table: Difference between revisions

(→‎Standard BASIC: new section)
 
(13 intermediate revisions by 9 users not shown)
Line 139:
 
The BASIC entry notes that there are ISO and ECMA standards for the language. While this is true, the vast majority of implementations simply ignore the standards; indeed, many compiler writers have chosen instead to "standardize" on some variation of Microsoft BASIC, due to its popularity. Should this be noted somehow in the table itself? -- [[User:Eriksiers|Eriksiers]] 20:04, 10 April 2010 (UTC)
: Create an Encyclopedia page to hold the extended and supporting details and references for that cell? *bemusedly notes that you could directly transclude that page, with <includeonly> and <noinclude> sections.* --[[User:Short Circuit|Michael Mol]] 22:03, 10 April 2010 (UTC)
:: You mean something like "BASIC standards"? Hmm... Lemme think on it, and dig up some links. -- [[User:Eriksiers|Erik Siers]] 21:04, 11 April 2010 (UTC)
::: More generally, [[Encyclopedia:Language/Column]], considering it's probable other cells in the table can and will be able to benefit from the same treatment. But, yeah. --[[User:Short Circuit|Michael Mol]] 21:08, 11 April 2010 (UTC)
 
== Other considerations for language comparision tables ==
 
Here are some considerations that I use in my documentation. It may be useful to include these in the table also:
 
* Compilation Model - Is there a compiler available that converts the programs into
native mode executables? Or can the program be converted to bytecode for use by a bytecode interpreter? Or is [[JIT]] compilation used at runtime, or is the language only utilized by an interpreter?
 
* Input / Output Model - Does the language support the use of C IO Model, or does the language only utilize [[redirection]] operators, or does it use its own IO model (such as REXX).
 
* Named Locations - Does the language support the use of location names, or are line numbers required?
 
* Does the language support [[terminal control]]? If so, to what extent? (I will develop a scale for this)
 
* Does the language support the use of colour terminals?
 
* Does the language support the use of graphics? If so, is this achieved via svgalib, or is an X server required?
 
* Does the language support the use of sound? Is this just a terminal beep, or can the language be used to drive a pc speaker? Is there support in the language for use of a sound card?
 
* Does the language support the use of scoped variables?
 
* Does the language support the use of structures or user defined types?
 
* Does the language have the facility to obtain command line parameters for the program?
 
* Does the language provide a facilty for processing [[environment]] variables?
 
* Does the language provide support for outputting text to a line printer (for example via an LPRINT command)?
 
* Does the language provide support for on error events?
 
* Does the language provide a freefile facility for determining unused data stream or file numbers?
 
* Does the language provide the facility to determine whether or not a key has been pressed (for example an INKEY$ function).
 
* Does the language provide support for multiline if conditional branching?
 
* Does the language provide support for conditional compilation directives?
 
* If the language is interpreted, rather than compiled, can a [[hashbang]] mechanism be used at the top of the program to trigger an appropriate interpreter?
:Several points are related to library functions, not the language itself. Namely all about I/O, sound, graphics, terminal. The shebang mechanism is as OS question: for instance Mac OS 9 had a completely different mechanism to tell which command to use to open a given file (stored as a file property), and Windows uses the PATHEXT environment variable as well as the registry. [[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 14:28, 15 August 2020 (UTC)
 
==Perl 6 - Strongly typed==
I am intrigued by the following comment that TimToady added to an edit where Perl6 is changed to be strongly typed:
:''Perl 6 is strongly typed; all apparent polymorphism/conversion is user-controllable''
What does the comment mean w.r.t. an expression like <code>'1' + 1</code>. Would it work? Are there interpreter options and/or program statements that could make it work/not work? Would it work 'by default'? I just have a thought that a fuller answer might be more than say the answers for Java, Haskel or Python. --[[User:Paddy3118|Paddy3118]] 20:47, 13 September 2011 (UTC)
:You left out the most salient bit of the comment, which was "by the definition provided". So my remarks should be taken in the context [http://rosettacode.org/wiki/Type_strength]. Also, if you are extrapolating from the weak semantics of Perl 5, forget that, because Perl 6 has a completely different type system.
:So let's look at <tt>'1' + 1</tt>. The term <tt>'1'</tt> is known to be of type Str, while the <tt>1</tt> is of type Int. These are both types with well-defined, implementation-independent sets of values. (They are not confused into scalar values as they are in Perl 5.) The default string type is a sequence of Unicode graphemes without arbitrary size limit. The default integer type is the set of all integers without arbitrary size limit. So we don't have the problem of undefined types or overflow that the definition points out in C, nor is there any implementation dependency. Conversion of string to number is required to complain about ill-formed numbers. Any conformant implementation of Perl 6 must support these semantics.
:The expression in question does work by default, but not because of any implicit coercion within the actual addition operator, well, operators, really, since they're multi subs, which have signatures that know how to add integers, rationals, floaters, etc. But they don't do implicit coercion; instead, we use "mechanisms resembling weak typing" to define allowable coercions. There is a specific generic signature that allows coercion of strings to numeric, after which the appropriate numeric operator is applied. These signatures are defined in a magical outer lexical scope called the setting, and are ostensibly written in Perl 6, apart from the places where circularity must be broken by use of primitives. (A setting is allowed to cheat as long as everything in the setting ''appears'' to be written in Perl 6.)
:Any or all such overloaded signatures may therefore be shadowed in an inner scope, including the coercive generic signatures. One of the strong design principles of Perl 6 is that every lexical scope know exactly what language it is using, where "exactly" does not preclude genericity, but only accidental genericity. Therefore lexical scoping is how we override anything in the outer language and produce a new language in an inner lexical scope. Since Perl 6 is designed to be completely mutable in this sense, such an inner language can appear to be as weakly typed as you like, but since all of the outer primitives are, in fact, strongly typed, Perl 6 is better characterized as strongly typed.
:But finally, I'd like to point out that the very first thing the definition in question says is that type strength is a "vague term". <tt>:-)</tt> --[[User:TimToady|TimToady]] 23:44, 13 September 2011 (UTC)
::Thanks TimToady for the answer. I'm going to have to read this again to digest it, but then I ''did'' think my comment was probably asking to reveal more than just the tip of the iceberg. (Sometime soon I'm going to have to learn more of Perl6 as it continues to pique my interest). --[[User:Paddy3118|Paddy3118]] 03:13, 14 September 2011 (UTC)
 
== REXX ==
 
Please add entries for
REXX
ooRexx
NetRexx
--[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 04:11, 22 June 2013 (UTC)
 
== Esoteric languages ==
 
I think esoteric languages should be added to this table, possibly in another section. --[[User:12Me21]]
 
: Wouldn't most of the column headings be irrelevant for most esoteric languages.? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 23:40, 30 April 2015 (UTC)
1,336

edits