Re: Euphoria 2.5 Features..... ??

new topic     » goto parent     » topic index » view thread      » older message » newer message

This is a multi-part message in MIME format.
--------------000604050200070307080409

Concerning strings; Paul Graham Wrote an excellent article a few months 
ago that has a section very pertinent to this concept of adding a string 
type. By the way, my final vote is *don't add strings*, just make the 
interpreter optimize sequences that are only made of characters. We 
don't need a string data type. We just need the sequence data type to be 
a bit smarter.

    /    ***
        Most data structures exist because of speed. For example, many
    languages today have both strings and lists. Semantically, strings
    are more or less a subset of lists in which the elements are
    characters. So why do you need a separate data type? You don't,
    really. Strings only exist for efficiency. But it's lame to clutter
    up the semantics of the language with hacks to make programs run
    faster. Having strings in a language seems to be a case of premature
    optimization.

        If we think of the core of a language as a set of axioms, surely
    it's gross to have additional axioms that add no expressive power,
    simply for the sake of efficiency. Efficiency is important, but I
    don't think that's the right way to get it.

        The right way to solve that problem, I think, is to separate the
    meaning of a program from the implementation details. Instead of
    having both lists and strings, have just lists, with some way to
    give the compiler optimization advice that will allow it to lay out
    strings as contiguous bytes if necessary.
        ***/

The full text of this article is available at 
http://www.paulgraham.com/hundred.html

Mario Steele wrote:
[snip]

> First off, The wearing out Idea/Problem.  A String Type Variable.

[snip]

--------------000604050200070307080409
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body>
<font face="Times New Roman, Times, serif">Concerning strings; Paul
Graham Wrote an excellent article a few months ago that has a section
very pertinent to this concept of adding a string type. By the way, my
final vote is *don't add strings*, just make the interpreter optimize
sequences that are only made of characters. We don't need a string data
type. We just need the sequence data type to be a bit smarter.<br>
</font>
<blockquote><i><font face="Times New Roman, Times, serif">&nbsp;&nbsp;&nbsp;
***</font><br>
<font face="Times New Roman, Times, serif">&nbsp;&nbsp;&nbsp; Most data
  structures
exist because of speed. For example, many languages today have both
strings and lists. Semantically, strings are more or less a subset of
lists in which the elements are characters. So why do you need a
separate data type? You don't, really. Strings only exist for
efficiency. But it's lame to clutter up the semantics of the language
with hacks to make programs run faster. Having strings in a language
seems to be a case of premature optimization.</font><br>
  <br>
<font face="Times New Roman, Times, serif">&nbsp;&nbsp;&nbsp; If we think of
  the
core of a language as a set of axioms, surely it's gross to have
additional axioms that add no expressive power, simply for the sake of
efficiency. Efficiency is important, but I don't think that's the right
way to get it.</font><br>
  <br>
<font face="Times New Roman, Times, serif">&nbsp;&nbsp;&nbsp; The right way to
  solve
that problem, I think, is to separate the meaning of a program from the
implementation details. Instead of having both lists and strings, have
just lists, with some way to give the compiler optimization advice that
will allow it to lay out strings as contiguous bytes if necessary.</font><br>
<font face="Times New Roman, Times, serif">&nbsp;&nbsp;&nbsp;
  ***</font></i><br>
</blockquote>
<font face="Times New Roman, Times, serif">The full text of this
article is available at <a class="moz-txt-link-freetext"
href="http://www.paulgraham.com/hundred.html">http://www.paulgraham.com/hundred.html</a></font><font
 face="Times New Roman, Times, serif"><br>
<br>
Mario Steele wrote:<br>
[snip]<br>
</font>
<blockquote type="cite"
 cite="mid1308946833-1463792382-1070627949 at boing.topica.com"><font
 face="Times New Roman, Times, serif">First off, The wearing out
Idea/Problem.&nbsp; A String Type Variable.
  <br>
  </font></blockquote>
<font face="Times New Roman, Times, serif">[snip]</font><br>

--------------000604050200070307080409--

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu