Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #3196

Re: What attributes of a programming language simplify its implementation?

From Thomas Koenig <tkoenig@netcologne.de>
Newsgroups comp.compilers
Subject Re: What attributes of a programming language simplify its implementation?
Date 2022-10-08 22:44 +0000
Organization news.netcologne.de
Message-ID <22-10-025@comp.compilers> (permalink)
References <22-09-026@comp.compilers>

Show all headers | View raw


Christopher F Clark <christopher.f.clark@compiler-resources.com> schrieb:
> I answered this question on Quora, but I think it is relevant to this
> community (and I know I'll get discussion as a result)..
>
> What attributes of a programming language simplify its implementation.
>
>    1. Simple semantics. That's it. Simple semantics. (Simple meaning
>    whatever is easy to implement. Not mathematical elegance. Not
>    consistency.)
>
> How do you get there?

If ease of language implementation is the primary concern, then
one could use a stack-based language.  Easy to write an interpreter
or compiler for, hard to write in the language itself, so it will
likely be very unpopular (but popularity wasn't in the list of
requirements).

> Have a very simple set of types. BASIC had numbers, strings, and arrays.
> Don't worry about type conversions and floating point versus integer. Sweep
> that all under the rug.

You cannot "sweep it under the rug", you have to define the semantics
somewhere.  It is possible to define the semantics ad-hoc and not to
document them (which you seem to be advocating).  That is a recipe
for problems later.

> Whatever your implementation does, that's what it
> does. (Even simpler is what a lot of shells do, you have just "strings" and
> if the strings happen to be a number when you pass them to the "add
> function", + operator, it does arithmetic. If they aren't it, whatever it
> does is the definition.)

That strikes me as a bad idea if the language is supposed to be
used for something in the real world.  Ill-defined semantics are
a disservice to potential users (but not laying traps for the user
was not on the list of requirements, either).

[...]
[Sounds like we're on our way to reinventing Forth.  It had (still has)
famously tiny implementations. -John]

Back to comp.compilers | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

What attributes of a programming language simplify its implementation? Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-09-30 12:46 +0100
  Re: What attributes of a programming language simplify its implementation? Martin Ward <martin@gkc.org.uk> - 2022-10-01 15:56 +0100
    Re: What attributes of a programming language simplify its implementation? gah4 <gah4@u.washington.edu> - 2022-10-01 17:05 -0700
      Re: What attributes of a programming language simplify its implementation? gah4 <gah4@u.washington.edu> - 2022-10-02 00:11 -0700
      Re: What attributes of a programming language simplify its implementation? "Robin Vowels" <robin51@dodo.com.au> - 2022-10-03 12:34 +1100
        Re: What attributes of a programming language simplify its implementation? robin51@dodo.com.au - 2022-10-03 15:59 +1100
          Re: What attributes of a programming language simplify its implementation? gah4 <gah4@u.washington.edu> - 2022-10-03 12:28 -0700
    Re: What attributes of a programming language simplify its implementation? Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-10-02 01:21 +0100
  Re: What attributes of a programming language simplify its implementation? Thomas Koenig <tkoenig@netcologne.de> - 2022-10-08 22:44 +0000
    Re: What attributes of a programming language simplify its implementation? "minf...@arcor.de" <minforth@arcor.de> - 2022-11-14 05:14 -0800
      Re: What attributes of a programming language simplify its implementation? gah4 <gah4@u.washington.edu> - 2022-11-15 06:09 -0800
    RE: Re: What attributes of a programming language simplify its implementation? Roger L Costello <costello@mitre.org> - 2022-11-15 11:52 +0000
      Re: Re: What attributes of a programming language simplify its implementation? <minforth@arcor.de> - 2022-11-15 09:48 -0800
        Re: Re: What attributes of a programming language simplify its implementation? RPN? gah4 <gah4@u.washington.edu> - 2022-11-15 16:11 -0800
          Re: Re: What attributes of a programming language simplify its implementation? RPN? "minf...@arcor.de" <minforth@arcor.de> - 2022-11-16 04:54 -0800
            Re: Re: What attributes of a programming language simplify its implementation? RPN? "minf...@arcor.de" <minforth@arcor.de> - 2022-11-16 05:39 -0800
          Re: Re: What attributes of a programming language simplify its implementation? RPN? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2022-11-16 18:12 +0000

csiph-web