"Why F?" by David Epstein @Imagine1, Inc.

发信人: leavy (☆星河☆), 信区: Fortran
标 题: "Why F?" by David Epstein @Imagine1, Inc.
发信站: 南京大学小百合站 (Mon Aug 30 17:49:08 2004)

Why F?
David Epstein
Imagine1, Inc.
When I told somebody at Supercomputing '97 in San Jose that F was ``designed
for education'', she replied, ``What exactly does that mean?'' Apparently, th
e claim ``designed for education'' is used elsewhere, so I was being challeng
ed for some sort of
proof.

``Great. Where do I find more information about F?'' This was her response wh
en I gave her the following background.




--------------------------------------------------------------------------------

My First Bug
It took me over twenty four hours to find and fix my first programming bug. I
had missed a single character on a punch card and had no idea what was meant
by the message

7: incorrect statement

It seems the professor forgot to inform us about deciphering error messages,
so I had no idea what or where the error was. I had misspelled the word INTGE
R (forgot an ``E''.) After dropping my program cards and resorting several ti
mes, it took the aid
of a student that had passed the class the previous semester to locate the er
ror.

In F, if you misspell the word INTEGER, we tell you, ``You misspelled the wor
d INTEGER.'' (There was obvious interest at this point in the conversation, s
o I continued on that point.)

You will note that we know when a word is misspelled, but we do not automatic
ally fix it. That would essentially result in an extension to the language. I
nstead, we report it and require the student to fix it. We can, however, fix
it within the
compiler so no further error messages result. This is extremely important on
constructs such as IF, since a beginner is likely to look at the last error m
essage instead of the first; reporting that the ENDIF statement does not have
a matching IF
statement serves only to confuse the amateur.

If you miss a comma or a colon, we can tell you exactly what is missing. As w
ell, there are no curly brackets (``{'',``}'') or semicolons in F. We emphasi
ze words, like POINTER. If something is a pointer, you use the word POINTER.
Pointers can only
point at targets, which require the word TARGET.

Error Messages
There probably is really only one answer needed for your question--ERROR MESS
AGES! The single most important feature required by the absolute beginner is
good error messages. Having written compilers for the world's largest compute
r company, I know
that error messages are usually saved for the end--hastily thrown in after th
e testing for ``getting it right''. As well, many different developers have w
ritten these error messages, so consistency is not likely.

One problem with the choice of teaching today's most popular professional pro
gramming language for INTRODUCTORY PROGRAMMING is that the software is design
ed for professionals. The message

syntax error

is often enough for a professional if it points to the offending line. What l
anguages like F and Pascal can offer is an increased probability that everybo
dy gets a chance to program--not just ``the smart kids''.

F_world
By the way, having designed F to be both simple and powerful, we were able to
design a tutor called F_world (currently available on the free Windows 95/NT
download) that walks a beginner through the writing and running of their fir
st program. [Note
that this version requires a password, which is in the README file.] Instead
of simply printing ``hello world'', which often takes pages of explanation in
introductory C, C++, and Java textbooks, the F_world program will add number
s until zero is
entered.

The F_world ``beginner'' program uses a program, a module, a subroutine, and
sixteen of the F statements. That's about half the number of statements in th
e entire F language!

I have personally watched dozens of beginners use F_world to write their firs
t F program in about 30 minutes. The longest it has taken was around 45 minut
es. About 75% get it right. The youngest F_world graduate was an eight year o
ld. He did it faster
than his parents.

Warning
Beginners have a better chance--programmers tend to start typing as soon as t
hey get a window, or the glance over the F_world directions and miss too many
steps (I have to give this warning as my customers are usually instructors o
r programmers and
they forgot what it was like to not know how to program.)

Java
Everybody I talk to is interested in teaching Java, but don't know how to sta
rt. F was designed the same time Java was designed. The similarities between
F and Java are amazing. The core design choice in each language is that proce
dures must be
encapsulated in some more powerful mechanism. In F, every function and subrou
tine must be in a ``module''. In Java, every method must be in a ``class''.

The two languages diverge when it comes to inheritance, but that is often not
taught in the first semester anyway. Indeed, the high school AP test uses a
subset of C++ and inheritance is one of the excluded features. F modules are
a wonderful tool for
teaching data encapsulation, and that appears to be a focus for the first sem
ester computer science class.

We have written an article, featured in 1997 September MacTech magazine, ``Th
e F Programming Language Tastes Like Java.'' Hardcopies of this article are a
vailable (send me email).

A Northern California university will be teaching a combination of F and Java
in their CS1 (introduction to computers) class this spring semester. We will
be sure to point to the results.

Conclusion
I make sure not to let the customer walk away thinking that F is just a toy l
anguage, only good for beginners. F is extremely powerful, particularly for n
umerical programs. I like to use F, however, for general applications. I wrot
e the front end of
the F compiler in 30,000 lines of F, on a 486 DX2/66 portable with 12 MBytes
of memory. Minimal changes were made to get this code to run on PC Linux, Uni
x, and Macintosh (from back-slash ``/'' to forward-slash ``/'' to colon ``:''
and a few others for
the Mac).

F is portable! F is compiled. I like to say, ``Runs efficiently everywhere''.

Imagine1 is actively looking for schools (all levels) interested in teaching
F. Be sure to contact us (info@fortran.com) for more information.


--
※ 来源:.南京大学小百合站 bbs.nju.edu.cn.[FROM: 172.16.66.171]
识别并分析Lengyel-Epstein系统中的TuringHopf分岔现象需要深入理解系统动态稳定性分析。为了帮助你深入理解这一主题,特别推荐阅读《扩散驱动的不稳定性研究:Lengyel-Epstein系统中的Turing与Hopf分岔分析》。本文将重点介绍如何在Lengyel-Epstein系统中进行分岔分析,并通过实例说明。 参考资源链接:[扩散驱动的不稳定性研究:Lengyel-Epstein系统中的Turing与Hopf分岔分析](https://wenku.csdn.net/doc/2d10qcm5er?spm=1055.2569.3001.10343) 首先,Turing分岔是一种导致系统从均匀稳定状态过渡到空间不均匀稳定状态的机制。在Lengyel-Epstein系统中,Turing分岔通常涉及到两个化学物质(如反应物A产物B)的浓度差异。要识别Turing分岔,需要构造适当的反应-扩散方程,并分析扩散系数反应速率对系统稳定性的影响。在稳定性分析中,通常通过线性稳定性分析来确定参数空间中导致均匀态不稳定的区域,即Turing分岔的临界点。 对于Hopf分岔,它描述的是系统从一个稳定点过渡到周期性振荡的现象。在Lengyel-Epstein系统中,Hopf分岔通常发生在特定的参数条件下,如反应速率或扩散系数超过某个临界值。Hopf分岔的识别涉及计算雅可比矩阵的特征值,当一对纯虚数特征值出现时,表明系统可能出现周期性振荡。通过改变相关参数,可以确定系统是否会出现Hopf分岔,并分析这种振荡的稳定性频率。 在实际操作中,可以通过数值模拟实验来观察验证理论分析结果。例如,通过改变化学反应器中的扩散系数并记录反应物产物的浓度变化,可以观察到Turing分岔导致的空间模式形成,或者Hopf分岔引起的周期性波动。这些实验验证了理论模型的预测能力,并有助于理解复杂的化学生物系统行为。 通过阅读《扩散驱动的不稳定性研究:Lengyel-Epstein系统中的Turing与Hopf分岔分析》,你将获得系统性地分析理解Lengyel-Epstein系统中分岔现象的专业知识。这不仅对于学术研究具有重要意义,而且对于化学反应器设计生物系统模拟等实际应用也有着直接的指导作用。 参考资源链接:[扩散驱动的不稳定性研究:Lengyel-Epstein系统中的Turing与Hopf分岔分析](https://wenku.csdn.net/doc/2d10qcm5er?spm=1055.2569.3001.10343)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值