什么是抽象? [英] What is abstraction?

查看:26
本文介绍了什么是抽象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在流程中看到了抽象.我在数据中看到了抽象.

I see abstraction in processes. I see abstraction in data.

我发现抽象正在丢失不重要的细节.

I see that abstraction is losing the unimportant details.

我认为抽象是为一组元素命名并将它们视为一个单元.(但我不知道为什么这被认为是抽象的.所以,我需要澄清这一点)

I see that abstraction is giving a group of elements a name and treating them as one unit. (But I don't know why that is considered abstraction. So, please I need clarification on this particular point)

我知道也有抽象的层次,虽然这个名字暗示了一些东西,但我没有一个实际的例子,我想不出具体的一个我对抽象的定义感到困惑.

I know there are also levels of abstraction, and although the name implies something, I don't have a practical example, and I can't think of a specific one I'm confused about the definition of abstraction.

有人可以写一篇全面的文章吗?抓那个.有人能给出全面的答案吗?

Can somebody write a comprehensive article? Scratch that. Can somebody give a comprehensive answer?

-谢谢您的回答.但是,我正在寻找一个通用的答案.例如,我正在阅读一篇文章,其中将过程视为抽象.然而,这里的答案是关于 C# 和 Java 中的抽象类,(直到现在.)再次感谢.

- Thank you for your answers. However, I was looking for a generalized answer. For example, I'm reading an article in which procedures are considered abstractions. However, here the answers are about abstract classes in C# and Java, (until now.) Thank you again.

推荐答案

抽象是隐藏实现的技术.这个答案的核心没有更多.抽象的大部分含义来自于它的使用方式和原因.

Abstraction is the technique of hiding implementation. At it's core there's not much more to that answer. The bulk of meaning to abstraction come from how and why it is used.

用于以下场景

  • 降低复杂性.(创建一个简单的界面)
  • 允许在不影响用户的情况下修改实施.
  • 创建一个通用接口来支持多态(对抽象层的所有实现都一视同仁.
  • 强制用户扩展实现而不是修改.
  • 通过更改每个平台的实现来支持跨平台.

这篇关于什么是抽象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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