flat assembler
Message board for the users of flat assembler.

Index > Heap > What's your favourite programming language and why?

Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author
Thread Post new topic Reply to topic
TmX



Joined: 02 Mar 2006
Posts: 821
Location: Jakarta, Indonesia
TmX
f0dder wrote:
Multiparadigm for the win - use the language*S* that are(!) right for the task at hand instead of limiting yourself.


Multiparadigm, exactly. Smile
Read this somewhere (LTU, if not mistaken) that OO is more suitable for writing data structures, and FP for algorithms. More or less like that. Scala and F# are 2 big examples.
Interesting approach, I guess.

Of course in the end, use the right language for the right job Smile
Post 23 Jun 2011, 03:54
View user's profile Send private message Reply with quote
JoeCoder1



Joined: 13 Jun 2011
Posts: 62
JoeCoder1
You don't need OO for data structures, you need a language that supports abstract data types. Abstract data types existed decades before OO.

--
Those who do not know programming history are condemned to use OO Wink
Post 23 Jun 2011, 08:35
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1409
Location: Toronto, Canada
AsmGuru62
OO is awesome power if properly used!
And a nightmare if used improperly.
Post 23 Jun 2011, 17:43
View user's profile Send private message Send e-mail Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Quote:
You don't need OO for data structures

Nobody claimed that.
Post 23 Jun 2011, 19:40
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
TmX wrote:
Of course in the end, use the right language for the right job Smile


Yes! And I know the name of the "right language" - FASM! Twisted Evil Laughing
Post 24 Jun 2011, 05:46
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
asm because it makes anything possible and accessible.

by dividing the most complex algorithms in elementary functions, you make possible for a poor brain like me to understand maths and computer science. that is not a fact to ignore.
Post 12 Aug 2011, 14:56
View user's profile Send private message Visit poster's website Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8903
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
C++0X, who knows, maybe people will shift to this upgraded standard Smile

http://en.wikipedia.org/wiki/C%2B%2B0x
Post 18 Aug 2011, 20:09
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1409
Location: Toronto, Canada
AsmGuru62
That lang. seems even more complex than C++ - and even more distanced from Assembler.
Post 19 Aug 2011, 01:12
View user's profile Send private message Send e-mail Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 678
Location: Mar del Plata
Enko
Does someone remember those book of the 80s talking about the diference beetween a structured language and assembly? (goto, jmps, etc...)
Saying that if you use GOTO you will burn in hell...

Don't you prefare more the GOTO than this:
Code:
void ** (*d) (int &,  char **(*)(char *, char **));       
                                      // d is a pointer to a function that takes
                                       // two parameters:
                                       //     a reference to an int and a pointer
                                       //     to a function that takes two parameters:
                                       //        a pointer to a char and a pointer
                                       //        to a pointer to a char
                                       //     and returns a pointer to a pointer 
                                       //     to a char
                                       // and returns a pointer to a pointer to void
    

When does someone will use such complex definitions...., where the reality is that for the CPU there is only db, dd, dq...
Post 19 Aug 2011, 03:33
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
We all know how C can be abused in these ways. The evil GOTO thing is not true. It is just some guys opinion and is not some sort of god given decree that must be followed. Don't worry about some arrogant publication telling you GOTO is bad, and just do what feels right to you and be happy.
Post 19 Aug 2011, 07:46
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Enko: Your function should have returned pointer to function which also takes function pointer as argument. THEN it would have been funny.
Post 19 Aug 2011, 09:39
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17279
Location: In your JS exploiting you and your system
revolution
vid wrote:
Enko: Your function should have returned pointer to function which also takes function pointer as argument. THEN it would have been funny.
revolution wants to see it. Please show example.
Post 19 Aug 2011, 09:48
View user's profile Send private message Visit poster's website Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 678
Location: Mar del Plata
Enko
sorry vid, its not my example, its copy past from here
http://www.codeproject.com/KB/cpp/complex_declarations.aspx

I´m note that skilled nor lunatic on C++.
I dont use it that much, because i dislike the giantic quantity of data types, and almost constant need of type casting.... I hate type casting.
Thats the reason I like assembly and php. And somehow object pascal, but there is no a good pascal compiler... free pascal, delphi, gnu pascal doesn´t generate as good executable as VC++ does.
Post 19 Aug 2011, 15:37
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
revolution: Enjoy

Code:
#include <stdio.h>

// function takes int and returns int
int somefunc(int x) 
{
 return x==42?x:42;
}

// function takes pointer to somefunc-like function and returns the same pointer +1
int (*IncrementFuncPtr(int(*arg)(int)))(int)
{ 
      return (int(*)(int))((char*)arg+1);
}

// function takes nothing and returns pointer to IncrementFuncPtr-like function
int (*(*GetIncrementFunc())(int(*)(int)))(int)
{
    return &IncrementFuncPtr;
}

int main()
{
 // get pointer to incrementfuncptr, and call it on somefunc
 printf("%X + 1 = %X", &somefunc, GetIncrementFunc()(&somefunc));
  return -0;
}
    


But of course sane people don't do it this way.

PS: Interesting thing is how create function that accepts pointer to iteself, without typedef or void* Smile
Post 19 Aug 2011, 17:19
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8903
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
how about some update for year 2014,
roughly 3 years changes, anyone?
Code:
*&(#$=#(@*.[4]5.4/$$$000, == 0
&&&...*(#@&*$&!^@@#8943, == hello world!
    

if you could figure out the above code, i gonna call you genius!!!!
Post 03 Jun 2014, 00:08
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1409
Location: Toronto, Canada
AsmGuru62
2nd is C++ (no frills, barebone). 1st we already know (it is FASM!).
Post 03 Jun 2014, 14:47
View user's profile Send private message Send e-mail Reply with quote
nyrtzi



Joined: 08 Jul 2006
Posts: 192
Location: Off the scale in the third direction
nyrtzi
sleepsleep wrote:
how about some update for year 2014,
roughly 3 years changes, anyone?


Yes, now I consider C, C++, Java and most other languages harmful and would need to get off my lazy bottom and implement a language of my own which would at least in the beginning compile to C.

What kind of language? Something similar to C but with generic functions, Lispy syntax and a type system which is strong enough for my taste.

Out of the existing languages I'd have to say that I still prefer C and Python.
Post 04 Jun 2014, 13:19
View user's profile Send private message Reply with quote
sid123



Joined: 30 Jul 2013
Posts: 340
Location: Asia, Singapore
sid123
Nice question. Smile
Before choosing my language I first look at the following things:
* Is it portable? Can I use that language (and by language I mean it's Standard Library along with it's compiler) for different platforms? Meaning can I run my program on Windows, Mac or Linux without any large modifications or better by just recompiling?

* Does it have a large dependency? I tend to avoid langauges which use non-portable libraries o/r any other non-portable dependencies. Languages like C# have the .NET VM as a large dependency. Most of the graphical C# applications tend to use System.Windows.Forms which infact is not even available on Mono. Java has a better chance in this one though.

*Do I know it well? Are there better resources for me? This IMO is the most important thing, unless you know a language you can't write programs for it. And to know a language you need excessive documentation.

*Is it powerful? By this I mean can I write almost anything in that language. From my OS to HQ Games to Networking Applications. C++ is the industry standard, and thus beats it's only competitor which is C.

The only two languages that fit the best here are C and C++ (with C++ having a greater win). Standard Libraries like the Standard POSIX C library (which is available for any sane platform), Don't have much dependencies (C beats C++ in this one, you need some runtime support to use the full features of C++ like exception handling and new[] and delete[] operators), are throughly documented and powerful.
I use C!

_________________
"Those who can make you believe in absurdities can make you commit atrocities" -- Voltaire https://github.com/Benderx2/R3X
XD
Post 04 Jun 2014, 14:52
View user's profile Send private message Reply with quote
TmX



Joined: 02 Mar 2006
Posts: 821
Location: Jakarta, Indonesia
TmX
sid123 wrote:

* Does it have a large dependency? I tend to avoid langauges which use non-portable libraries o/r any other non-portable dependencies. Languages like C# have the .NET VM as a large dependency.


If you work on typicall business apps (not high performance game, scientific computing, or system programming),
large dependencies are relatively acceptable nowadays, because disk storage
and memory are getting cheaper.
Rich Hickey, the creator of Clojure said:
Quote:

VMs, not OSes, are the platforms of the future


And let's not forget hybrid OO+FP languages like F# or Scala are the current
hot stuff.

That's said, I'm still quite biased to C-ish languages, like D, or Go Smile
Post 04 Jun 2014, 15:26
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8903
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
nyrtzi wrote:

and implement a language of my own which would at least in the beginning compile to C.

all kind of motivation to stir current available programming languages is always a good thing (TM) =)

from what i learn and experienced,
i try to look it at the foundation, the basic of programming should be managing 0 and 1, and no more,

variable creation should be automatic, including variable name, what i could see is lack of relationship.

there was an article that introduce programming language as an operating system concept. which i wholeheartedly agree.

i mentioned about game as programming language, the use of transport tycoon like game to facilitate programming an application.

the short-cut in programming language should be really smart.
the chain of input -> process -> output then loop into input for another process should be tackle intelligently.

there should be BOM (bill of material) built in inside variable concept, this whole process should be tackle like how we tackle physical goods, inventory, point of sales.

a process will have invoice, cash sales and etc (concept) to another process,
accounting and transparency should be built in inside this programming language.

process and creation must be totally separated.

if process B demand a variable from process A, this mean a cash sales.
if process B demand a variable from process A, after process then return to process B, this is then purchase return.

this whole thing is just 0 and 1, and we just need to come up with something totally new, that based on our illusion matrix physical world processes,

maybe some sort of accounting/financial theory expanded inside a programming language.
Post 04 Jun 2014, 16:12
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.