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


Groups > comp.lang.c > #63032

Re: one type less language

From jt@toerring.de (Jens Thoms Toerring)
Newsgroups comp.lang.c
Subject Re: one type less language
Date 2015-06-06 23:21 +0000
Organization Freie Universitaet Berlin
Message-ID <cthdk0Fnjb7U2@mid.uni-berlin.de> (permalink)
References <ee5b4ddd-7a35-4bff-bc23-b04ec5abf25a@googlegroups.com> <4fc72288-16e5-41cc-a814-7b598cbc2c13@googlegroups.com>

Show all headers | View raw


asetofsymbols@gmail.com wrote:
> I imagine something as
> a="1234asdfv"
> b=1.564
> c={1,2,3}{4,5,6}
> a is a string
> b is a number 
> c is a 2x3 matrix
> So if now I write
> b=c
> Than b is the matrix 
> the same of c
> And the memory store the value 1.564
> is free.
> This is like maple V and other math
> language existing I saw in university.
> One miss the original type when
> there is one operator= 

>  is it better a type centric language as C, or C++ or better 
> these "type free" languages?

There are lots of languages that don't care much about types,
Python is probably one of the most commonly used at the moment.
But, while a more-or-less type-agnostic language can be very
nice for rapid prototyping, it has also its disadvantages:
not having to define new variables or "cast" in assignments,
it allows for bugs that, in strongly-typed language would
have been caught at some stage (either by the compiler or
the interpreter). So there have been diverging developments
in the last decades. On the one hand, you have (mostly inter-
preted) languages, that don't care too much about types, and
which are mostly well-suited for fast development (and, also,
for use by amateurs that can't be expected to understand the
fine points of types) and languages (like e.g. ADA) that go
into the exact opposite direction and are meant for mission-
critical programs, where a single bug could kill lots of people
(or cost millions) - so making it "harder" to write (buggy)
programs is a huge benefit. C is something in between these
two extremes.

Being a physicist by training and often dealing with data from
acquiring and valuating data from experiments I'd sometimes love
to have an even stronger-typed language that deals with units
automatically (or would throw some kind of exception if, for
example, the result of a multiplication of a voltage and a
curent would be attempted to be stored in a variable that had
not been defined as usable for a power only;-) Having different
units converted automatically (e.g. from pounds to kg or feet
to meters etc.) would be even better - that may have avoided
losing an extremely expensive and irreplaceable spacecraft on
Mars some years ago...
                            Regards, Jens
-- 
  \   Jens Thoms Toerring  ___      jt@toerring.de
   \__________________________      http://toerring.de

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


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