Re: [tsc-devel] Rewrite: Programming language
Marvin Gülker |
Mon, 25 Sep 2017 19:33:22 UTC
Hi,
Am 25. September 2017 um 11:43 Uhr -0700 schrieb Taran Lynn <…0@g…>:
> The main problem with using Linux dependency management is that you cannot
> install multiple dependencies.
> This can be a problem when working on several projects with different
> version dependencies. If you're using
> several other people's projects this can make building them difficult.
I see this, and I think that's what kirbyfan is/was working on before I
posted on the mailinglist a few days ago. Build systems have however
developed some measures against this, most notably Autotool's `--with-*'
switches and CMake's `CMAKE_PREFIX_PATH'. I find the latter easier to
use.
> Also, I was coming from a Haskell/ML background when I was thinking of
> error passing and generics. Haskell's error passing is like go's,
> except errors are automatically passed up.
Okay.
> Generics (what we call parametric polymorphism) is also first class and much
> nicer than C++ templates.
At some point, I may or may not take a deeper look into computer science
subjects like these. For now, remember that I am a law student (and not
a CS student, and never been one) who has tought himself programming
using online resources, book consumption, digging through several
open-source projects and reading programmers' mailing lists over a
timespan of about ten years by now. While I am confident I can write
good programmes, I lack the theory behind it, thus I will never be
able to write excellent programmes.
I understand that polymorphism means being able to handle an object
without knowing the exact type it has; inheritance is an example of
polymorphysm, and so is Ruby's duck typing (defining the constraints of
an object by means of what methods it provides, rather than looking at
the type). Go's interfaces fulfill my understanding of
polymorphism. From there on, you have deeper knowledge on the theory
than me, because I've never encountered the terms "Generics" or
"parametric polymorphism" before. I'm going to consult Wikipedia on the
terms.
I learn programing languages like tools. I try to understand their
idioms, determine if I like their syntax, examine their ecosystem and
community, and then try to use the language that fits a problem best
while still fitting my perception of being pleasant to work with. The
theory behind certain aspects of a programming language is interesting,
but usually not part of my learning or use of it. Consequently, I would
not be able to design a programming language and I do not strive for
it. All due respect to people who can do this, but it is not my world. I
cannot create complex and efficient algorithms, but I can implement them
if I have a definition, so to say.
> Still, I find myself missing templates (mainly due to the STL) when I
> program in C. All in all I do appreciate C++'s features, as they can
> save time and effort, even if they are ugly.
C has macros, but I guess this is even uglier than C++'s templates. D
has an advanced macro system that I found much easier to work with than
C++'s templates.
Marvin
--
Blog: https://www.guelkerdev.de
PGP/GPG ID: F1D8799FBCC8BC4F