Never worked with FORTRAN, but the power-feature of changing a literal's 
value (i mean, the expression "2" is a literal) is quite unique!! :P

Regarding the question itseft about pointers, i would like to share an 
example of the real life: road signs in london vs road signs in buenos 
aires.

In london the max speed limit sign is a sign without any value on, the sign 
has a paint a  graph, is just a sign that let the driver understand the can 
go at the "current max national speed limit", a value that is assumed to be 
well know to every driver. (pointer variable)

[image: National speed limit] 
<https://cdn.images.express.co.uk/img/dynamic/24/590x/Speed-limit-576709.jpg>









PRO: If the max speed changes there is no rework on repainting every sign 
board on the roads.
CONS: Every driver must know the current max speed limit. If he doesn't 
recall it, we got a problem.

In buenos aires the max speed limit sign is a literal value, so the driver 
see directly "on the board" the max speed limit. (value variable)
PRO: Every driver doens't have to know about the current max speed limit.
CONS: If the max speed changes there is a rework for repating the boards on 
the roads.

Here is a first thing to notice about working with direct values vs 
pointers. In this scenario, there is a kind of trade off depending on the 
system you choose.
Going into the computer domain, you could say that the "sign on the road" 
is the variable, the "driver" is the program's execution flow. When a 
program's execution flow reach an statement involving a varable in a 
expression (like the driver seeing a sign on the road) it will, eventualy, 
evaluate that variable accordengly (taking into account if is pointer, so 
it has to fetch the value elsewhere, or not, so it has the value at hand). 
The thing is that using london sign system the driver in real life may not 
recall the value but if the driver were a computer that doesn't fails to 
fetch the actual value i don't see quite a problem. So the CONS that i 
stated above can be kind of void if we move frpm the business domain (cars 
controlled by humans) to the digital domain (cars controlled by machines), 
thus, allowing me to think, at a first stance, that pointers, in this 
scenario, may save a lot of rework when the time for changing the max speed 
limit comes... but, again, there is no predefined formula that works 
everytime.

Of course, this example can be extended with more questions that makes you 
think deeper about system's design, and even make you fallback to sign to 
values.

What happens if the roads has to has several max sign limits according to 
different landspaces?
In a city where each road has a different max speed, it is worth to use an 
"indirect" sign system, like the london sign system?
What happen if the android driver (assuming that is a computter) fails to 
get the current max sign limit? I would say that you have an alternative 
flow here to work with... thing that would be translated into a java 
exception or a golang error.


Guess i have say a lot already jaja, is enought for today i guess.



El domingo, 6 de enero de 2019, 18:02:10 (UTC-3), Michael Jones escribió:
>
> My hardest-to-debug ever bug was because of this.
>
> Because FORTRAN is pass by reference, the compiler must do something 
> special for the four in "SQRT(4.0)" -- and the PDP-10 (TOPS-10) FORTRAN 
> compiler used a global literal table for this. I had a function that 
> modified an argument, erroneously passed a literal  number in, the compiler 
> housed the number (may have been a 2)  in the the gkobal table, and after 
> that, all the "2" arguments in my program were invisibly changed.
>
> I was 16 or 17, was an explorer scout at BTL, and was quick to embrace 6th 
> edition UNIX and ed over TOPS-10 and TECO (ignoring the brilliantly named 
> SOS, "son  of stopgap")
>
> On Sun, Jan 6, 2019 at 12:15 PM Rob Pike <r...@golang.org <javascript:>> 
> wrote:
>
>> Fortran depends heavily on pointers for its semantics: It is a call by 
>> reference language. You just don't see them explicit in the language and 
>> you have no control over whether an argument will be modified by a 
>> procedure.
>>
>> -rob
>>
>>
>> On Mon, Jan 7, 2019 at 5:13 AM Victor Giordano <vituc...@gmail.com 
>> <javascript:>> wrote:
>>
>>> i guess that a good question to start is there is a language that 
>>> doesn't relays on pointer. Fortran as someone says below, may be a good 
>>> example how things get done using values only. I programmed in COBOL in the 
>>> universitiy and don't recall to use pointers. There aren't necessary at 
>>> all, nevertheless they provide inderection or referrals that allow to 
>>> express things more efficiently in certain scenarios. You could write an 
>>> entire program witout using pointers,i guess, that call is in the cook 
>>> chief!.
>>> Nice topic to talk.
>>>
>>>
>>> El martes, 1 de enero de 2019, 8:34:34 (UTC-3), 伊藤和也 escribió:
>>>>
>>>> What are the reasonable reasons to use pointers? Are pointers neseccary?
>>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "golang-nuts" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to golang-nuts...@googlegroups.com <javascript:>.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to golang-nuts...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
>
> *Michael T. jonesmichae...@gmail.com <javascript:>*
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to