You are in charge of developing a new programming language. You are not the one who has to implement it, you just have to tell the codemonkies what you want.
Some things to think about:
- syntax style
- paradigm
- garbage collection or not
- vm or compiled
- type system
- special features of the compiler or language
Name:
Anonymous2008-11-03 22:12
- syntax style
Postfix notation. I lurve Lisp, for the obvious reason, but postfix is similar only moreso. I'll take it.
- paradigm
All of them, with an eye towards functional programming.
- garbage collection or not
Duh, of course. I will go so far as to say that anyone who doesn't want GC is an idiot.
- vim or compiled
Emacs. Why do you think these things are different? Is Java compiled? What does it run in?
- type system
Yes, please. Dynamic, of course.
- special features of the compiler or language
It's interactive. If I even have to come near batch compilation, I'm hurting someone.
- paradigm
Iterative but have support for infinite recursive tail calls, perhaps a few functional constructs.
- garbage collection
Yes please.
- vm or compiled
Compiled as in C is compiled.
- type system
Static, but support for things like templated classes for building ADTs. (LinkedList<Int> list...)
- special features of the compiler
Error output like Java does. Has the erroneous spot on the line marked with ^. This makes life easier. Also, good error reporting.
- special features of the language
Don't have to declare function return types
If there are 2+ items in the function header, do not need to keep repeating the type. (def AddInts(Int a, b): ...)
Name:
Anonymous2008-11-03 22:39
I'd just tell them to implement Sepples but instead of cout, I'd just tell them to implement printf.
Name:
Anonymous2008-11-03 22:42
- syntax style
English.
- paradigm
All of them
- garbage collection or not
Yes
- vm or compiled
VM
- type system
All of them
- special features of the compiler or language
All of them
Name:
Anonymous2008-11-03 23:16
I haven't really thought about this much, so it's probably not so coherent.
- syntax style
Probably somewhat Haskell-style.
- paradigm
Functional, probably not pure. Not lazy, or at least not lazy by default.
- garbage collection or not
GC, preferably precise, incremental, concurrent and compacting.
- vm or compiled
Definitely compiled, but the target doesn't matter. Everything's a VM really. Compile it to brainfuck if you like.
- type system
A strong static type system. I like type classes too, might as well have those.
- special features of the compiler or language
Computation expressions.
Name:
Anonymous2008-11-03 23:45
- syntax style
Like Java, with some keywords like using borrowed from C#
- paradigm
same as Java
- garbage collection or not
same as Java
- vm or compiled
same as Java VM but with optional compilation to native code
- type system
static
Name:
Anonymous2008-11-04 0:12
>>4
"Iterative" is not a paradigm, you mouth-breathing non-programmer.
Name:
Anonymous2008-11-04 0:38
- syntax style
Java
- paradigm
OO
- garbage collection or not
No!
- vm or compiled
compiled
- type system
strong static
- special features of the compiler or language
numerous easter eggs that will be inserted into your program w/o your knowledge unless you read the compiler code OPTIMIZED TAIL RECURSION OMG ÜBER-OPTIMIZED options in the compiler i will purposefully make the language incompatible with .NET and the JVM
Name:
The Sussman2008-11-04 1:47
- syntax style
()
- paradigm
multi-paradigm but mostly functional
- garbage collection or not
yes
- vm or compiled
REPL + compilable
- type system
same as Scheme
Also must have tail call optimization and car/cdr.
Name:
Anonymous2008-11-04 2:28
VM or compiled? Fucking idiots all of you, but what's new.
VMs define their own instruction sets, like a concrete machine but its software hence virtual. Languages that run on VMs are typically compiled to the instruction set of the VM. So VM is compiled.
What you mean to say was interpreted or compiled. Any language can be interpreted, so the question is fucking stupid.
But just to fuck you idiots up even more there are virtual machines that exist that interpret to the concrete machine and some that compile to the concrete machine's instructions.
Java can compile to VM instructions (called byetcode) or to the concrete machines instructions. .Net compiles to the concrete machines instructions, or to an intermediate OO assembly language that is then compiled to the VMs bytecode.
Some don't have a VM. Some have a VM and an interpreter implementations widely available (ECMAScript for example).
C can be compiled or interpreted. JavaScript can be compiled to a VM or interpreted.
The question is faggishly stupid.
Name:
Anonymous2008-11-04 2:55
Why would I need to ask people to write anything new on the language front when Erlang already exists?
I might want the code monkeys to provide a good cross platform UI library binding (wxWidgets, Fox, whatever) so they can dirty their hands with that level of plumbing.
Name:
Hiro Protagonist2008-11-04 3:26
>>12
Ivory Tower elitism at it's finest. The semantics of the question was obvious to anyone with half a brain. No need to split hairs, here.
Name:
Anonymous2008-11-04 4:18
- syntax style
C-like
- paradigm
Imperative, Procedural, Linear
- garbage collection or not
No
- vm or compiled
Translated to Asm
- type system
8, 16, 32, 64, 128-bit integers
structures and arrays
any variable can be used for any purpose
- special features of the compiler or language
None.
Name:
Anonymous2008-11-04 5:08
- syntax style
C-like, or Python-like, or Lisp-like, or Assembly-like; whatever you prefer. Before a block of code you declare what style your code is written in; the implementation is distributed with tools that will automatically reformat code from any style to any style without, so you, your old school COBOL granddad and that perl hacker in Poland can all understand each other's modifications to a shared piece of code.
- paradigm
Bare bones: The base language should only have simple operations common to the vast majority of processors, like addition, multiplication (the implementation will handle the few cases where such an operation isn't available on the architecture), moving data between variables, binary operators and so on.
There will be standard libraries that extend functionality; however, there must be code that implements these special functions in terms of the base language (for code compatibility between architectures) that can be run to perform the same functions in addition to any specialized versions of the code that takes advantage of the host architecture's non-standard extra machine operations.
- garbage collection or not
I'm debating with myself how to go about it; I'm thinking that there should be three types of variables, "garbage collect when out of scope", "garbage collect when there are no more references to this variable" and "do not automatically garbage collect at all".
- vm or compiled
Implementations of compilers to all systems and all virtual machines would be nice; I'm
- type system
The fundamental character of a variable is byte-size; "foo, n bytes", for instance, declares that I want an n-byte variable. The implementation handles whether this is at the machine code level actually an array of bytes or a native system type. You can further put type checks in the variables, like "foo, n bytes, array of m byte elements, two's complement". (Preferably with better syntax.) This is used for both error checking (all type casts are explicit, by the way; none of C's auto-casting) and for choosing between functions with the same name but different arguments.
- special features of the compiler or language
Ultimately, I want something that is highly portable,
No, you are an idiot. As explained, the question is meaningless. You just didn't understand the explanation, there really isn't a simpler way to put it.
>>19
No, you are being deliberately obtuse and pedantic
Name:
Anonymous2008-11-04 14:35
- syntax style
ONE WORD, FORCED INDENTATION OF THE
- paradigm
MULTI
- garbage collection or not
????
- vm or compiled
INTERPRetED
- type system
NONe
- special features of the compiler or language
???????
LISP?????
Name:
Anonymous2008-11-04 14:54
>>20
Then please explain the question in a way that makes sense. If it's that simple, you should be able to do it.
Name:
Anonymous2008-11-04 18:06
ONE WORD, FORCED INDENTATION OF THE
This is my first time seeing a word missing two words ("the" and "code", just as keikaku (keikaku means plan in japanese)).
Did you mean for me to explain to you in a simple way why the question VM or compiled is meaningless, beyond the detailed explanation given.
Fucking idiots.
The simplest one that you are too stupid to understand is that "VM" is never an alternative to "compiled" when implementing a high level computer programming language.
Any high level computer programming language could be compiled to a machines instruction set. VM is a virtual machine, it is implemented in software and its instruction set is known as bytecode. Compiled here probably means compiled to a a concrete machines instruction set. Be the machine virtual or concrete, a high level language would be able to be compiled to that machines instruction set.
So again, "VM" is never an alternative to "compiled" when implementing a a high level computer programming language. So "VM or Compiled" makes no sense since all high level computer programming languages are always capable of both.
You see how I am repeating myself and restating the same thing in different ways? I am talking to you like a fucking retard, because you are.
Just because high level language X isn't implemented on any virtual machine does not mean it cannot be. .Net has over 40 languages on its VM for fucks sake, and more are added all the fucking time. If you consider C or C++ a "compiled" language you are an idiot because C++ is implemented on VMs. Or if you want to be a faggot and mention some ASM language then you really are a faggot because, 1. Not high level, 2. Not compiled (they are assembled which is a different and distinct process).
Ignorant faggots. Give up programming now.
Name:
Anonymous2008-11-04 18:54
>>22
The question was whether the language is typically compiled directly to machine code, as opposed to being interpreted or run through a JIT.
You fail to make the distinction between a language and an implementation of it.
Don't worry, it's a common beginner mistake, made for instance by Guido Opossum, Kisama Matsumoto and Larry Thrall.
Anyways, I was about to start coding, and then the bastard beside me goes "I want to make a scripting language".
Who in the world wants to make an interpreter with ad-hoc semantics nowadays, you moron?
I want to ask him, "do you REALLY want to make a shitty interpreter?"
I want to interrogate him. I want to interrogate him for roughly an hour.
Are you sure you don't just want to try saying "scripting language"?
Coming from a PL veteran such as myself, the latest trend among us vets is this, embedded DSLs.
That's right, embedded DSLs. That is the vet's way of coding.
Embedded DSLs mean more macros than functions. But on the other hand you don't reinvent the wheel. This is the key.
And then, it's fast. This is unbeatable.
However, if you do this then there is danger that you'll be marked by the employers from next time on; it's a double-edged sword.
I can't recommend it to amateurs.
What this all really means, though, is that you, >>25, should just stick with today's special.
- type system
Everything is bit addressable. Data types can be any length of bits or bytes, i.e. BYTE14 for a single data type that is 14 bytes in length, or BIT12 for a 12-bit data type.
- special features of the compiler or language
If an error is encountered, it intelligently compiles a substitute or workaround.
Name:
Anonymous2008-11-04 22:25
>>24
If I had meant you, I would have asked you. Goddamn, even when someone around here is right, they're still a moron.
Name:
Anonymous2008-11-04 23:11
>>25
Or so you speculate. Don't JITs compile directly to machine code? Couldn't any bytecode be executed by a suitable CPU? In what world does "VM" include interpreters? Face it, there was nothing in the original question to indicate what the OP was thinking (not that OP has the capacity for thought).
- syntax style
Braces and python-like. (use FIOC;)
- paradigm
Functional and procedural OO.
- garbage collection or not
User-definable.
- vm or compiled
Both. The planned implementation is an interpreter in x86-asm and a compiler in the language itself.
- type system
Static.
- special features of the compiler or language
Definable operator overloading, type polymorphism, duck typing may be added with "magic" __to__ and __from__ methods, perl-like sigils, \ is the lambda operator, @ is the reflection operator, multiple inheritance.
Also, shitloads of other stuff.
Name:
Anonymous2008-11-05 0:22
>>31
I suggest you try the bondage & discipline-oriented language Haskell.
Name:
Anonymous2008-11-05 0:26
>>30 Don't JITs compile directly to machine code?
Yes, dynamically, not statically. That's the whole point.
In what world does "VM" include interpreters?
ಠ_ಠ
Name:
Anonymous2008-11-05 1:11
>>34
If that were the point, it would have been mentioned before >>35.
* It combines from all programming language, including C, Basic, InterCal, Brainfuck, JavaScript, Lisp, PHP, Perl, SQL,etc. (including ABSTAIN,REINSTATE,FORGET in InterCal)
* It has force variable data types, but you don't have to use those; it also works without them.
* Both structure and un-structure commands
* Macros that you can do replacement with, for example: Macro(nlist a_ b_ = List.Ad1,a_,b_ qlist replace List in nlist)
* Values also have properties that don't do anything, but strings will be arrays of characters, so a property(type=string) will be one of them
* New types of numbers and everything can be made up using combinators and lambdas
* All kind of data types, arrays, strings(arrays), lists(arrays), numbers, bit, bitseq(arrays), functions, objects, functions-of-objects, sets, structured types, puding, references, pointers, etc.
* Short syntax for everything, like @(counts>256?{#pr.3(counts);call}) for a if command
* Communicate outside the program will be a separate object that will be call from outside to inside the program
>>66,67
Wow, and yet I very strongly prefer Intel syntax to AT&T. Well, I guess I should quit bitching about FIOC now, because it doesn't have syntax either.
How about just reimplementing Haskell Prelude from scratch this time according to the Category Theory? As a language Haskell is nearly perfect, we just need better libraries.
How about just reimplementing Common LISP standard libraries from scratch this time using Scheme's naming convention? As a language Common LISP is nearly perfect, we just need consistency.
Name:
Anonymous2010-12-07 11:15
>>71
We don't need names that aren't even pronounceable in theory without turning spoken Lisp into a tonal language. Not to mention the semantic issues with using “?” to mark predicates. A predicate is an assertion, not a question. “?” functions had better be returning #y or #n, not #t or #f, or you've just compounded your Lisp fail with a natlang fail. Common Lisp could use some regularization, but there's no need to import Schemeish brain damage.
How about just reimplementing C++ standard libraries from scratch this time using Java's API? As a language C++ is nearly perfect, we just need ENTERPRISE.