Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Les Cargill <lcargill99@comcast.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: one type less language |
| Date | 2015-06-06 13:01 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <mkvc34$fs9$1@dont-email.me> (permalink) |
| References | <ee5b4ddd-7a35-4bff-bc23-b04ec5abf25a@googlegroups.com> <vQFcx.145087$m8.98284@fx16.iad> |
Richard Damon wrote:
> On 6/6/15 1:08 AM, asetofsymbols@gmail.com wrote:
>> Yes it is possible to have a language
>> without types...
>> Than how easy represent
>> struct name{
>> Type1 name;
>> Type2 name2;
>> Etc
>> };
>> And find the errors in wrong type
>> operator= call?
>>
>
> Isn't it a contradiction of terms to have a "Typeless" language and then
> have a "wrong type" call?
>
No; you have to constrain over what domain a value is "wrong" because
of a semantic type mismatch.
> Actually, I am not sure if I know of a language without type (there may
> well be one) but I think you are thinking of languages with run time
> type bindings, i.e. a "variable" doesn't have a predefined type, but can
> at different times hold values of differing types.
Basically.
In Tcl you can:
% catch {
set x [ expr Hello + 42.0 ]
puts "x=<$x>"
} ow
1
% puts "ow=<$ow>"
ow=<invalid bareword "Hello"
in expression "Hello + 42.0";
should be "$Hello" or "{Hello}" or "Hello(...)" or ...>
%
This being said, Tcl is not purely typeless. "Everything
is a string" ( until it isn't ). String is the least restrictive
type and bad conversions are what is flagged.
> In such a language,
> yes, the system won't flag putting the "wrong type" into a "variable",
> just as in C the compiler won't flag putting the wrong value (of the
> right type) into a variable, you need to detect this and then look back
> to find out where it came from.
--
Les Cargill
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
one type less language asetofsymbols@gmail.com - 2015-06-05 22:08 -0700
Re: one type less language David Kleinecke <dkleinecke@gmail.com> - 2015-06-06 09:35 -0700
Re: one type less language Richard Damon <Richard@Damon-Family.org> - 2015-06-06 13:10 -0400
Re: one type less language Les Cargill <lcargill99@comcast.com> - 2015-06-06 13:01 -0500
Re: one type less language Michael Angelo Ravera <maravera@prodigy.net> - 2015-06-07 13:03 -0700
Re: one type less language Les Cargill <lcargill99@comcast.com> - 2015-06-06 12:55 -0500
one type less language asetofsymbols@gmail.com - 2015-06-06 12:15 -0700
Re: one type less language Bartc <bc@freeuk.com> - 2015-06-06 20:23 +0100
Re: one type less language Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-06 20:28 +0100
Re: one type less language jt@toerring.de (Jens Thoms Toerring) - 2015-06-06 23:21 +0000
Re: one type less language Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-06-07 09:59 -0700
Re: one type less language Bartc <bc@freeuk.com> - 2015-06-07 20:20 +0100
Re: one type less language jt@toerring.de (Jens Thoms Toerring) - 2015-06-08 09:42 +0000
Re: one type less language Bartc <bc@freeuk.com> - 2015-06-08 11:28 +0100
Re: one type less language Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-06-08 05:10 -0700
Re: one type less language Mel <mel@zzzzz.com> - 2015-06-08 15:39 +0300
Re: one type less language "J. Clarke" <j.clarke.873638@gmail.com> - 2015-09-08 05:23 -0400
Re: one type less language Robert Wessel <robertwessel2@yahoo.com> - 2015-09-08 10:20 -0500
Re: one type less language Keith Thompson <kst-u@mib.org> - 2015-06-06 13:56 -0700
Re: one type less language luser droog <luser.droog@gmail.com> - 2015-06-07 23:20 -0700
Re: one type less language asetofsymbols@gmail.com - 2015-06-08 02:50 -0700
csiph-web