为什么ColdFusion的设计者决定从1而不是0索引数组? [英] Why did the designers of ColdFusion decide to index arrays from 1 rather than 0?

查看:123
本文介绍了为什么ColdFusion的设计者决定从1而不是0索引数组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是好奇这个真的,有没有人知道他们为什么打破了这个公约?

I'm just curious about this really, does anyone know why they broke convention on this one?

谢谢,
Ciaran

Thanks, Ciaran

推荐答案

@Cory:你会惊讶地知道谁在StackOverflow上潜伏。 : - )

@Cory: You'd be surprised to know who lurking on StackOverflow. :-)

你是非常对的。 CFML的原始设计是允许非程序员构建复杂的Web应用程序。 ColdFusion\CFML是专为构建Web应用程序而设计的第一种语言。早在1995年,网络大多是静态HTML,你典型的web开发者没有做太多的编程。语言本身被设计得尽可能简单,这是为什么它仍然是最快/最简单的语言之一学习。

You are very much right. The original design of CFML was to allow non-programmers to build complex web applications. ColdFusion\CFML was the first language designed specifically for building web applications. Back in 1995 the web was mostly static HTML and your typical 'web developer' wasn't doing too much programming. The language itself was designed to be as simple as possible which is why it's still one of the fastest/easiest languages to learn.

这可能会导致一些混乱,特别是当ColdFusion代码直接与Java或.NET交互时。然而,它只是成为那些怪癖之一。该决定在2000/2001年重新回顾,当CF被重建为Java EE应用程序时,但是向后兼容性阻止了更改。

It can lead to a bit of confusion, especially when ColdFusion code interacts directly with Java or .NET. However, it's just become one of those 'quirks'. The decision was revisited back in 2000/2001 when CF was rebuilt as a Java EE application, but backward compatibility prevented the change.

这篇关于为什么ColdFusion的设计者决定从1而不是0索引数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆