嵌入D(编程语言) [英] Getting Embedded with D (the programming language)

查看:229
本文介绍了嵌入D(编程语言)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢很多关于D的内容。

I like a lot of what I've read about D.


  • 统一文档(这将是
    使我的工作很容易)

  • 内置于
    语言的测试功能。

  • 以语言调试代码支持。
  • 转发声明。 (我总是
    认为这是愚蠢的声明
    相同的功能两次。)

  • 内置功能来替换
    预处理器。

  • 模块

  • 用于正确类型检查的typedef
    而不是别名。

  • 嵌套函数。 (咳嗽 PASCAL
    咳嗽

  • 输入和输出参数。 (多显而易见!)

  • 支持低级编程 -
    嵌入式系统,哦,是的!

  • Unified Documentation (That would make my job a lot easier.)
  • Testing capability built in to the language.
  • Debug code support in the language.
  • Forward Declarations. (I always thought it was stupid to declare the same function twice.)
  • Built in features to replace the Preprocessor.
  • Modules
  • Typedef used for proper type checking instead of aliasing.
  • Nested functions. (Cough PASCAL Cough)
  • In and Out Parameters. (How obvious is that!)
  • Supports low level programming - Embedded systems, oh yeah!

但是:


  • 可以D支持嵌入式系统
    不会运行操作系统? / li>
  • 直接解决
    它不支持16位处理器
    完全从在这样的机器上运行的嵌入式
    应用程序中完成?有时你不需要锤子来解决你的问题。

  • 垃圾收集在Windows或Linux上是非常好的,但是不幸的是,嵌入式应用程序有时候必须执行显式的内存管理。
  • 数组边界检查,你喜欢它,你讨厌它。非常适合设计保证,但对于性能问题却不能允许。

  • 对于多线程支持,对嵌入式系统有什么影响,而不是运行操作系统?我们有一个甚至不喜欢中断的客户。更少的操作系统/多线程。

  • 是否有嵌入式系统的D-Lite?

  • Can D support an embedded system that not going to be running an OS?
  • Does the outright declearation that it doesn't support 16 bit processors proclude it entirely from embedded applications running on such machines? Sometimes you don't need a hammer to solve your problem.
  • Garbage collection is great on Windows or Linux, but, and unfortunately embedded applications sometime must do explicit memory management.
  • Array bounds checking, you love it, you hate it. Great for design assurance, but not alway permissable for performance issues.
  • What are the implications on an embedded system, not running an OS, for multithreading support? We have a customer that doesn't even like interrupts. Much less OS/multithreading.
  • Is there a D-Lite for embedded systems?

因此,基本上D适合于只有几兆字节(有时小于一个字节)的嵌入式系统,而不是运行一个操作系统,在编译时必须知道最大内存使用量(每个要求),并且可能在小于32位处理器?

So basically is D suitable for embedded systems with only a few megabytes (sometimes less than a magabyte), not running an OS, where max memory usage must be known at compile time (Per requirements.) and possibly on something smaller than a 32 bit processor?

我对某些功能非常感兴趣,但我得到了桌面应用程序开发人员的印象。

I'm very interested in some of the features, but I get the impression it's aimed at desktop application developers.

具体是什么使它不适合16位的实现? (假设16位架构可以解决足够的内存来保存运行时间,无论是在闪存还是RAM中)。仍然可以使用32位值来计算,尽管比16位慢,并且需要更多的操作,使用库代码。

What is specifically that makes it unsuitable for a 16-bit implementation? (Assuming the 16 bit architecture could address sufficient amounts of memory to hold the runtimes, either in flash memory or RAM.) 32 bit values could still be calculated, albeit slower than 16 bit and requiring more operations, using library code.

推荐答案

我不得不说,这个问题的简短答案是否。

I have to say that the short answer to this question is "No".


  • 如果你的机器是16位,你会遇到很大的问题,将D嵌入到它中 - 它不是为它设计的。 li>
  • D本身不是一种轻薄的语言,它生成了很多通常链接到您的应用程序中的运行时类型信息,而且也是类型安全变体所需要的(因此标准格式化功能是它探戈或Phobos)。这意味着即使是最小的应用程序的大小也令人惊讶,因此可能会从具有低RAM的系统中取消D的资格。另外,D作为共享库(可以减轻其中一些问题)的运行时,一直没有被测试。

  • 所有当前的D库需要一个C标准库,因此通常也是一个操作系统,所以即使这样做反对使用D.但是,在D中确实存在实验内核,所以本身不是不可能的。今天就没有任何图书馆。

我个人希望看到你成功,但怀疑这将是轻松的工作。

I would personally like to see you succeed, but doubt that it will be easy work.

这篇关于嵌入D(编程语言)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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