Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #60764
| From | Rod Pemberton <NeedNotReplyHere@xrsevnneqk.cem> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: When forth powered desktop pc? |
| Date | 2017-06-14 20:00 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <20170614200034.4dbdfa54@_> (permalink) |
| References | <ec2119d7-9a3e-44b3-9c86-8d494ea60291@googlegroups.com> <ohph1v$1rbu$1@gioia.aioe.org> <3b344e85-826d-4ba7-a533-925fda7be44f@googlegroups.com> |
On Tue, 13 Jun 2017 19:32:20 -0700 (PDT) gavino himself <jackvanc3@gmail.com> wrote: > can forth outperform php ruby python java c? Outperform? Unlikely. All high-level languages are converted to assembly. (Actually, it's converted to the processor's binary instruction format, but this is usually referred to as "assembly" since no one programs in binary.) So, the best outcome is the most optimized assembly for the given task. A good compiler will generate very optimized assembly. If you have two high-level languages whose compilers generate excellently optimized assembly, how can one outperform the other? They'll both basically generate the exact same code for the same task. I.e., you're limited by the assembly language of the microprocessor, if you have a good optimizing compiler for your high-level language. If you don't have a good optimizing compiler, then you're limited by the compiler or your ability to code efficiently. > is forth the best? The best is the language which most accurately and easily expresses the problem you're attempting to solve via your program. This can be measured in various ways. One way is called the "code density" of a language. There are all sorts of metrics to measure code density, e.g., "function points." > is it really simpler? In certain aspects, Forth really is simpler than the C language. That's not a good thing. Simplicity can mean much more work for you. In Forth, you must keep track of items on a stack, i.e., stack juggling. C does much of this for you and hides much of it too. So, the question you should ask is: "is it really easier?" I'd argue that *NOT* having to handle certain types of simplicity makes the language simpler, as in less work. Let's call that being easier. Personally, one reason I don't like assembly is because of the simplicity. There is no easy way to implement variables in many assembly languages. The variable may be in memory where you need to reference it by a memory address, or it may be in a register where you need to reference it by a register name, or it may be on the stack where you need to reference it by an offset to another register, usually. There is no unified method to access a variable in assembly, i.e., you can't access it by name no matter where the value is located, unlike a high-level language. Arguably, assembly is simpler, but it's not easier. Whereas, with a high-level language like C, variables are available. Variables make my life easier, hence simpler. > I dont think I can learn coloforth... Why? Unavailable? Too complex? Colorblind? Low IQ? Handicapped? Medicated? What? Rod Pemberton -- The Paris Agreement is irrelevant. A carbon tax is futile. The only solution is technology. Please tell Elon Musk that he is not being a technology visionary.
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
When forth powered desktop pc? gavino himself <jackvanc3@gmail.com> - 2017-06-13 09:01 -0700
Re: When forth powered desktop pc? Ron Aaron <rambamist@gmail.com> - 2017-06-13 19:39 +0300
Re: When forth powered desktop pc? gavino himself <jackvanc3@gmail.com> - 2017-06-13 12:57 -0700
Re: When forth powered desktop pc? Ron Aaron <rambamist@gmail.com> - 2017-06-14 10:17 +0300
Re: When forth powered desktop pc? "HAA" <someone@microsoft.com> - 2017-06-14 22:39 +1000
Re: When forth powered desktop pc? gavino himself <jackvanc3@gmail.com> - 2017-06-14 08:10 -0700
Re: When forth powered desktop pc? gavino himself <jackvanc3@gmail.com> - 2017-06-14 08:08 -0700
Re: When forth powered desktop pc? "Robert L." <No_spamming@noWhere_7073.org> - 2017-06-13 20:13 +0000
Re: When forth powered desktop pc? gavino himself <jackvanc3@gmail.com> - 2017-06-13 19:32 -0700
Re: When forth powered desktop pc? Rod Pemberton <NeedNotReplyHere@xrsevnneqk.cem> - 2017-06-14 20:00 -0400
Re: When forth powered desktop pc? gavino himself <jackvanc3@gmail.com> - 2017-06-15 11:14 -0700
Re: When forth powered desktop pc? minforth@arcor.de - 2017-06-15 11:57 -0700
Re: When forth powered desktop pc? gavino himself <jackvanc3@gmail.com> - 2017-06-16 06:47 -0700
Re: When forth powered desktop pc? Konstantin Tcholokachvili <tcholoka@gmail.com> - 2017-06-16 07:26 -0700
Re: When forth powered desktop pc? gavino himself <jackvanc3@gmail.com> - 2017-06-16 07:42 -0700
csiph-web